[clang] e9533b8 - [NFC] Add paranthesis around logical expression to silence -Wlogical-op-parentheses warning.
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 13 06:54:37 PDT 2021
Author: Bogdan Graur
Date: 2021-07-13T15:54:31+02:00
New Revision: e9533b84920798cf9b35d26586a61bad0a1f9825
URL: https://github.com/llvm/llvm-project/commit/e9533b84920798cf9b35d26586a61bad0a1f9825
DIFF: https://github.com/llvm/llvm-project/commit/e9533b84920798cf9b35d26586a61bad0a1f9825.diff
LOG: [NFC] Add paranthesis around logical expression to silence -Wlogical-op-parentheses warning.
Reviewed By: alexfh
Differential Revision: https://reviews.llvm.org/D105890
Added:
Modified:
clang/lib/Sema/SemaDeclAttr.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 87e5531a7705..a5d0597e39c4 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -7405,8 +7405,8 @@ static void handleOpenCLAccessAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
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()))) ||
More information about the cfe-commits
mailing list