summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/cppcoreguidelines-macro-usage.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2019-04-17 22:35:36 +0000
committerAlexander Kornienko <alexfh@google.com>2019-04-17 22:35:36 +0000
commit4c177038e096dad3646fe8fc33682e6ef2f590fa (patch)
treeeb34e3426fd51b3118d83a43a0e915742ccc8499 /clang-tools-extra/test/clang-tidy/cppcoreguidelines-macro-usage.cpp
parentb0c1f8c09e432e064951f6dac1ecac17a7050c37 (diff)
downloadbcm5719-llvm-4c177038e096dad3646fe8fc33682e6ef2f590fa.tar.gz
bcm5719-llvm-4c177038e096dad3646fe8fc33682e6ef2f590fa.zip
[clang-tidy] Don't issue cppcoreguidelines-macro-usage on builtin macros
Before the patch calling clang-tidy with -header-filter=.* -system-headers would result in a few hundred useless warnings: warning: macro '_GNU_SOURCE' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '_LP64' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_ACQUIRE' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_ACQ_REL' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_CONSUME' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_RELAXED' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_RELEASE' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__ATOMIC_SEQ_CST' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] warning: macro '__BIGGEST_ALIGNMENT__' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] ... and so on llvm-svn: 358621
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/cppcoreguidelines-macro-usage.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/cppcoreguidelines-macro-usage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-macro-usage.cpp b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-macro-usage.cpp
index a4948f5b329..edce328ec65 100644
--- a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-macro-usage.cpp
+++ b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-macro-usage.cpp
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s cppcoreguidelines-macro-usage %t
+// RUN: %check_clang_tidy %s cppcoreguidelines-macro-usage %t -- -header-filter=.* -system-headers --
#ifndef INCLUDE_GUARD
#define INCLUDE_GUARD
OpenPOWER on IntegriCloud