[clang] [HLSL] Implement the 'and' HLSL function (PR #127098)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 15 15:37:40 PST 2025
================
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+ if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+ if (CheckVectorElementCallArgs(&SemaRef, TheCall))
+ return true;
+
+ // CheckVectorElementCallArgs(...) guarantees both args are the same type.
+ assert(TheCall->getArg(0)->getType() == TheCall->getArg(1)->getType() &&
----------------
farzonl wrote:
This assert is unecessary here. If you want to assert do it in CGBuiltins.cpp.
https://github.com/llvm/llvm-project/pull/127098
More information about the cfe-commits
mailing list