[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 14:30:20 PDT 2024


================
@@ -2018,6 +2018,11 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
       return true;
     break;
   }
+  case Builtin::BI__builtin_hlsl_group_memory_barrier_with_group_sync: {
+    if (SemaRef.checkArgCountAtMost(TheCall, 0))
----------------
bogner wrote:

Do we even need to check the argument count? since the prototype is `void()` instead of being variadic we shouldn't even be able to get here if someone tries to call the builtin with an argument - I would expect that they'd get an error about having too many arguments way before this.

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


More information about the cfe-commits mailing list