[flang-commits] [flang] [flang][NFC] Add parenthesis to avoid warning (PR #131219)

via flang-commits flang-commits at lists.llvm.org
Thu Mar 13 14:22:53 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

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

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

<details>
<summary>Changes</summary>

Remove warning introduced in 369da8421c2f7

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


1 Files Affected:

- (modified) flang/include/flang/Lower/BoxAnalyzer.h (+3-3) 


``````````diff
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;
             }

``````````

</details>


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


More information about the flang-commits mailing list