[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.");
       |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Mikael Holmen 2025-11-14 13:22:44 +01:00
parent 3add3abd53
commit 9ef2103cae
No known key found for this signature in database
GPG key ID: D20E140D7B5734C9

View file

@ -4087,9 +4087,9 @@ static bool hlslAggSplatHelper(EvalInfo &Info, const Expr *E, APValue &SrcVal,
if (!Evaluate(SrcVal, Info, E))
return false;
assert(SrcVal.isFloat() || SrcVal.isInt() ||
(SrcVal.isVector() && SrcVal.getVectorLength() == 1) &&
"Not a valid HLSLAggregateSplatCast.");
assert((SrcVal.isFloat() || SrcVal.isInt() ||
(SrcVal.isVector() && SrcVal.getVectorLength() == 1)) &&
"Not a valid HLSLAggregateSplatCast.");
if (SrcVal.isVector()) {
assert(SrcTy->isVectorType() && "Type mismatch.");