[PATCH] D105890: [NFC] Add paranthesis around logical expression to silence -Wlogical-op-parentheses warning.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 13 06:54:36 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe9533b849207: [NFC] Add paranthesis around logical expression to silence -Wlogical-op… (authored by bgraur, committed by alexfh).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105890/new/

https://reviews.llvm.org/D105890

Files:
  clang/lib/Sema/SemaDeclAttr.cpp


Index: clang/lib/Sema/SemaDeclAttr.cpp
===================================================================
--- clang/lib/Sema/SemaDeclAttr.cpp
+++ clang/lib/Sema/SemaDeclAttr.cpp
@@ -7405,8 +7405,8 @@
   if (const auto *PDecl = dyn_cast<ParmVarDecl>(D)) {
     const Type *DeclTy = PDecl->getType().getCanonicalType().getTypePtr();
     if (AL.getAttrName()->getName().find("read_write") != StringRef::npos) {
-      if ((!S.getLangOpts().OpenCLCPlusPlus &&
-               (S.getLangOpts().OpenCLVersion < 200) ||
+      if (((!S.getLangOpts().OpenCLCPlusPlus &&
+            (S.getLangOpts().OpenCLVersion < 200)) ||
            (S.getLangOpts().OpenCLVersion == 300 &&
             !S.getOpenCLOptions().isSupported("__opencl_c_read_write_images",
                                               S.getLangOpts()))) ||


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105890.358255.patch
Type: text/x-patch
Size: 820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210713/61cd2cb3/attachment.bin>


More information about the cfe-commits mailing list