[clang] 8568113 - Fix Wparentheses warning. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 8 12:02:39 PDT 2020
Author: Simon Pilgrim
Date: 2020-10-08T20:02:19+01:00
New Revision: 85681131019db5d6831fb3980aec683d517e1674
URL: https://github.com/llvm/llvm-project/commit/85681131019db5d6831fb3980aec683d517e1674
DIFF: https://github.com/llvm/llvm-project/commit/85681131019db5d6831fb3980aec683d517e1674.diff
LOG: Fix Wparentheses warning. NFCI.
Wrap the containErrors() calls together - assert we have any containErrors cases in the conditional operator.
Added:
Modified:
clang/lib/Sema/SemaExpr.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 17bb82af975f..dd2e8f8c0d25 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -8071,9 +8071,9 @@ QualType Sema::CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS,
(Cond.get()->isTypeDependent() || LHS.get()->isTypeDependent() ||
RHS.get()->isTypeDependent())) {
assert(!getLangOpts().CPlusPlus);
- assert(Cond.get()->containsErrors() || LHS.get()->containsErrors() ||
- RHS.get()->containsErrors() &&
- "should only occur in error-recovery path.");
+ assert((Cond.get()->containsErrors() || LHS.get()->containsErrors() ||
+ RHS.get()->containsErrors()) &&
+ "should only occur in error-recovery path.");
return Context.DependentTy;
}
More information about the cfe-commits
mailing list