================
@@ -3816,6 +3804,9 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, 
unsigned BuiltinID,
   }
 
   case Builtin::BI__builtin_allow_sanitize_check: {
+    if (checkArgCount(TheCall, 1))
----------------
ojhunt wrote:

I do wonder if we should just check the argument count at the very beginning of 
`CheckBuiltinFunctionCall` -- we already call `GetBuiltinType`, and while we'd 
need to check for varargs and custom type checking flags it seems like it would 
be more robust to handle the bulk of these function's arg count checks 
immediately.

@AaronBallman added that call originally so I wonder if he knows why we can't 
do this :D

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

Reply via email to