[PATCH] D116378: [clang-tidy] Disable clang-tidy warnings from system macros

Salman Javed via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 6 02:36:35 PST 2022


salman-javed-nz added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp:23-40
+namespace {
+class VaArgPPCallbacks : public PPCallbacks {
+public:
+  VaArgPPCallbacks(ProTypeVarargCheck *Check) : Check(Check) {}
+
+  void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD,
+                    SourceRange Range, const MacroArgs *Args) override {
----------------
Should this be in another patch?

Line 722 in ClangTidyDiagnosticConsumer.cpp makes it so that clang-tidy filters warnings from system macros. This would benefit all checks.

This VaArgPPCallBack change here only benefits `cppcoreguidelines-pro-type-vararg`.


================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp:46-78
+    "__builtin_isgreater",
+    "__builtin_isgreaterequal",
     "__builtin_isless",
-    "__builtin_islessequal", 
-    "__builtin_islessgreater", 
+    "__builtin_islessequal",
+    "__builtin_islessgreater",
     "__builtin_isunordered",
+    "__builtin_fpclassify",
----------------
Formatting changed for code not directly involved in this patch. Should be moved to a separate NFC commit that you don't have to run by us.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116378/new/

https://reviews.llvm.org/D116378



More information about the cfe-commits mailing list