https://github.com/RKSimon created 
https://github.com/llvm/llvm-project/pull/177134

None

>From 5c6fadc832141edea53b2b713232f4a398e9324c Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <[email protected]>
Date: Wed, 21 Jan 2026 10:03:21 +0000
Subject: [PATCH] [clang] Fix a couple of gcc Wparentheses warnings. NFC.

---
 clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp | 6 +++---
 clang/lib/Sema/SemaOpenMP.cpp                        | 5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp 
b/clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
index ccedd0522cbb3..d5990597e1614 100644
--- a/clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+++ b/clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
@@ -402,9 +402,9 @@ void FactsGenerator::VisitMaterializeTemporaryExpr(
   if (!MTEList)
     return;
   OriginList *SubExprList = getOriginsList(*MTE->getSubExpr());
-  assert(!SubExprList ||
-         MTEList->getLength() == SubExprList->getLength() + 1 &&
-             "MTE top level origin should contain a loan to the MTE itself");
+  assert((!SubExprList ||
+          MTEList->getLength() == (SubExprList->getLength() + 1)) &&
+         "MTE top level origin should contain a loan to the MTE itself");
   MTEList = getRValueOrigins(MTE, MTEList);
   if (getChildBinding(MTE)) {
     // Issue a loan to MTE for the storage location represented by MTE.
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 084abaf487bb8..456e94a009d2f 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -24816,9 +24816,8 @@ 
SemaOpenMP::ActOnOpenMPUseDeviceAddrClause(ArrayRef<Expr *> VarList,
 
     // Get the declaration from the components
     ValueDecl *CurDeclaration = 
CurComponents.back().getAssociatedDeclaration();
-    assert(isa<CXXThisExpr>(BE) ||
-           CurDeclaration &&
-               "Unexpected null decl for use_device_addr clause.");
+    assert((isa<CXXThisExpr>(BE) || CurDeclaration) &&
+           "Unexpected null decl for use_device_addr clause.");
 
     MVLI.VarBaseDeclarations.push_back(CurDeclaration);
     MVLI.VarComponents.resize(MVLI.VarComponents.size() + 1);

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to