[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)
Damyan Pepper via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 16 14:55:15 PDT 2024
================
@@ -12881,6 +12886,12 @@ QualType Sema::CheckVectorLogicalOperands(ExprResult &LHS, ExprResult &RHS,
if (!getLangOpts().CPlusPlus &&
!(isa<ExtVectorType>(vType->getAs<VectorType>())))
return InvalidLogicalVectorOperands(Loc, LHS, RHS);
+ if (getLangOpts().HLSL &&
+ getLangOpts().getHLSLVersion() >= LangOptionsBase::HLSL_2021) {
+ (void)InvalidOperands(Loc, LHS, RHS);
+ HLSL().emitLogicalOperatorFixIt(LHS.get(), RHS.get(), Opc);
+ return QualType();
+ }
----------------
damyanp wrote:
As a naive reader, a comment explaining why HLSL is special here would be appreciated.
https://github.com/llvm/llvm-project/pull/108659
More information about the cfe-commits
mailing list