[clang-tools-extra] [clang-tidy] Allow type-generic builtins in pro-type-vararg check (PR #178656)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 2 08:43:53 PST 2026
================
@@ -178,6 +178,15 @@ void ProTypeVarargCheck::check(const MatchFinder::MatchResult &Result) {
if (const auto *Matched = Result.Nodes.getNodeAs<CallExpr>("callvararg")) {
if (hasSingleVariadicArgumentWithValue(Matched, 0))
return;
+
+ // Skip builtins with custom type checking - they use variadics as an
+ // implementation detail to accept multiple types, not for C-style varargs.
+ if (const auto *FD = Matched->getDirectCallee())
+ if (const unsigned BuiltinID = FD->getBuiltinID();
+ BuiltinID &&
+ Result.Context->BuiltinInfo.hasCustomTypechecking(BuiltinID))
----------------
localspook wrote:
Now that we have this check, can we remove some of the entries from the `AllowedVariadics` list? Can we remove the list entirely?
https://github.com/llvm/llvm-project/pull/178656
More information about the cfe-commits
mailing list