[PATCH] D116378: [clang-tidy] Disable clang-tidy warnings from system macros
Carlos Galvez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 6 12:26:08 PST 2022
carlosgalvezp added a comment.
Thanks for the review! I've fixed the nit, reverted unrelated changes to backticks and moved the class to the existing anonymous namespace. Since those are NFC changes I'll push now, if you don't agree let me know and I'll revert right away :)
================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp:32-33
+ Check->diag(MacroNameTok.getLocation(),
+ "do not use va_arg to define c-style vararg functions; "
+ "use variadic templates instead");
+ }
----------------
aaron.ballman wrote:
> Rather than duplicate the diagnostic text, I think we should hoist the text into a constant string that's used in both places.
>
> That makes it easier to fix the diagnostic (in a follow up) to properly quote `va_arg` and convert the grammar to singular form instead of plural (e.g, `do not use 'va_arg' to define a C-style vararg function; use a variadic template instead`).
Of course!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116378/new/
https://reviews.llvm.org/D116378
More information about the cfe-commits
mailing list