[flang-commits] [flang] [flang] Check for inappropriate symbols in ACC PRESENT (PR #169500)
via flang-commits
flang-commits at lists.llvm.org
Tue Nov 25 06:55:27 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- flang/lib/Semantics/check-acc-structure.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Semantics/check-acc-structure.cpp b/flang/lib/Semantics/check-acc-structure.cpp
index c47f3359c..eda824f08 100644
--- a/flang/lib/Semantics/check-acc-structure.cpp
+++ b/flang/lib/Semantics/check-acc-structure.cpp
@@ -714,13 +714,14 @@ void AccStructureChecker::CheckMultipleOccurrenceInDeclare(
parser::GetDesignatorNameIfDataRef(designator)) {
if (!name->symbol) {
context_.Say(GetContext().clauseSource,
- "'%s' is not an appropriate symbol for %s clause"_err_en_US,
- name->ToString().c_str(),
- parser::ToUpperCaseLetters(
- llvm::acc::getOpenACCClauseName(clause).str()));
+ "'%s' is not an appropriate symbol for %s clause"_err_en_US,
+ name->ToString().c_str(),
+ parser::ToUpperCaseLetters(
+ llvm::acc::getOpenACCClauseName(clause).str()));
} else {
if (declareSymbols.contains(&name->symbol->GetUltimate())) {
- if (declareSymbols[&name->symbol->GetUltimate()] == clause) {
+ if (declareSymbols[&name->symbol->GetUltimate()] ==
+ clause) {
context_.Warn(common::UsageWarning::OpenAccUsage,
GetContext().clauseSource,
"'%s' in the %s clause is already present in the same clause in this module"_warn_en_US,
``````````
</details>
https://github.com/llvm/llvm-project/pull/169500
More information about the flang-commits
mailing list