Skip to content

[flang][NFC] Add parenthesis to avoid warning #131219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
Merged

Conversation

clementval
Copy link
Contributor

Remove warning introduced in 369da84

@clementval clementval requested a review from klausler March 13, 2025 21:22
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Mar 13, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 13, 2025

@llvm/pr-subscribers-flang-fir-hlfir

Author: Valentin Clement (バレンタイン クレメン) (clementval)

Changes

Remove warning introduced in 369da84


Full diff: https://github.com/llvm/llvm-project/pull/131219.diff

1 Files Affected:

  • (modified) flang/include/flang/Lower/BoxAnalyzer.h (+3-3)
diff --git a/flang/include/flang/Lower/BoxAnalyzer.h b/flang/include/flang/Lower/BoxAnalyzer.h
index cd9037360a56b..3b68062904671 100644
--- a/flang/include/flang/Lower/BoxAnalyzer.h
+++ b/flang/include/flang/Lower/BoxAnalyzer.h
@@ -403,9 +403,9 @@ class BoxAnalyzer : public fir::details::matcher<BoxAnalyzer> {
                 continue;
               }
             } else if (subs.ubound().isStar()) {
-              assert(Fortran::semantics::IsNamedConstant(sym) ||
-                     Fortran::semantics::IsCUDAShared(sym) &&
-                         "expect implied shape constant");
+              assert((Fortran::semantics::IsNamedConstant(sym) ||
+                      Fortran::semantics::IsCUDAShared(sym)) &&
+                     "expect implied shape constant");
               shapes.push_back(fir::SequenceType::getUnknownExtent());
               continue;
             }

@clementval clementval merged commit 57d87ed into llvm:main Mar 13, 2025
9 of 13 checks passed
@clementval clementval deleted the fix_warn branch March 13, 2025 21:28
frederik-h pushed a commit to frederik-h/llvm-project that referenced this pull request Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants