Skip to content

Commit 9ef2103

Browse files
committed
[clang] Fix -Wparentheses warning [NFC]
Without this gcc warns like ../../clang/lib/AST/ExprConstant.cpp:4091:63: warning: suggest parentheses around '&&' within '||' [-Wparentheses] 4091 | (SrcVal.isVector() && SrcVal.getVectorLength() == 1) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ 4092 | "Not a valid HLSLAggregateSplatCast."); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 parent 3add3ab commit 9ef2103

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/AST/ExprConstant.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4087,9 +4087,9 @@ static bool hlslAggSplatHelper(EvalInfo &Info, const Expr *E, APValue &SrcVal,
40874087
if (!Evaluate(SrcVal, Info, E))
40884088
return false;
40894089

4090-
assert(SrcVal.isFloat() || SrcVal.isInt() ||
4091-
(SrcVal.isVector() && SrcVal.getVectorLength() == 1) &&
4092-
"Not a valid HLSLAggregateSplatCast.");
4090+
assert((SrcVal.isFloat() || SrcVal.isInt() ||
4091+
(SrcVal.isVector() && SrcVal.getVectorLength() == 1)) &&
4092+
"Not a valid HLSLAggregateSplatCast.");
40934093

40944094
if (SrcVal.isVector()) {
40954095
assert(SrcTy->isVectorType() && "Type mismatch.");

0 commit comments

Comments
 (0)