================
@@ -51,6 +51,38 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned 
BuiltinID,
     TheCall->setType(RetTy);
     break;
   }
+  case SPIRV::BI__builtin_spirv_reflect: {
+    if (SemaRef.checkArgCount(TheCall, 2))
+      return true;
+
+    ExprResult A = TheCall->getArg(0);
+    QualType ArgTyA = A.get()->getType();
+    auto *VTyA = ArgTyA->getAs<VectorType>();
----------------
inbelic wrote:

Ah yes, they are in `SemaHLSL.cpp`. I would assume the entire 
`CheckArgTypeIsCorrect` and `CheckAllArgTypesAreCorrect` functions + helpers 
would be helpful here as well.

These diagnostics could be implemented using that. So I do think it would be 
worthwhile making those common.

https://github.com/llvm/llvm-project/pull/122992
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to