[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 16 14:55:16 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);
----------------
damyanp wrote:

Throwing away the return value here makes me uneasy, but as long as you know that `InvalidOperands` will _always_ return `QualType()` it doesn't matter so much.  I assume people working on this code have that pretty internalized as an idomatic convention.

https://github.com/llvm/llvm-project/pull/108659


More information about the cfe-commits mailing list