[clang] [Sema] Check arg count for builtins with CustomTypeChecking (PR #222841)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 11 20:55:38 PDT 2026
================
@@ -145,6 +145,16 @@ bool SemaPPC::CheckPPCBuiltinFunctionCall(const TargetInfo &TI,
// - IsIntType: enforces any integer type
// Lambdas centralize type checks for BCD builtin handlers
+ // reject calls with more args than the builtin's declared prototype
----------------
im-lunex wrote:
i think removing "t" will get it duplicate diagnostics that's why .. ? yeah this might be cause cuz:
The `isTSBuiltin` branch is unconditional, It runs for every TS builtin regardless of "t". So `CheckPPCBuiltinFunctionCall` always executes and when "t" is absent that normal type-checking is not suppressed, so it emits generic C-like diagnostics.
soo when we had "t" included it didnt apply the prototype-based checks
https://github.com/llvm/llvm-project/pull/222841
More information about the cfe-commits
mailing list