[clang] 0784de2 - [clang] Fix a warning
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 15 12:50:43 PDT 2022
Author: Kazu Hirata
Date: 2022-10-15T12:50:34-07:00
New Revision: 0784de20e2ad5a91f07f952ae6d9887e380bccd6
URL: https://github.com/llvm/llvm-project/commit/0784de20e2ad5a91f07f952ae6d9887e380bccd6
DIFF: https://github.com/llvm/llvm-project/commit/0784de20e2ad5a91f07f952ae6d9887e380bccd6.diff
LOG: [clang] Fix a warning
This patch fixes:
clang/lib/Sema/SemaLambda.cpp:922:39: warning: suggest parentheses
around ‘&&’ within ‘||’ [-Wparentheses]
Added:
Modified:
clang/lib/Sema/SemaLambda.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index e0a9091c4f2b0..f2ec96955975e 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/lib/Sema/SemaLambda.cpp
@@ -916,11 +916,11 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro,
SourceLocation EndLoc;
SmallVector<ParmVarDecl *, 8> Params;
- assert(ParamInfo.getDeclSpec().getStorageClassSpec() ==
- DeclSpec::SCS_unspecified ||
- ParamInfo.getDeclSpec().getStorageClassSpec() ==
- DeclSpec::SCS_static &&
- "Unexpected storage specifier");
+ assert(
+ (ParamInfo.getDeclSpec().getStorageClassSpec() ==
+ DeclSpec::SCS_unspecified ||
+ ParamInfo.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static) &&
+ "Unexpected storage specifier");
bool IsLambdaStatic =
ParamInfo.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static;
More information about the cfe-commits
mailing list