summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-05-17 17:26:02 +0000
committerVedant Kumar <vsk@apple.com>2016-05-17 17:26:02 +0000
commit5119923cdd7c2340ce669e57bf67cb7ac79724ac (patch)
tree4afa65b132d77d56f2ae0e553997144258b10d53 /clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp
parent1c0f0b242da706ee4b31b5107273476358895049 (diff)
downloadbcm5719-llvm-5119923cdd7c2340ce669e57bf67cb7ac79724ac.tar.gz
bcm5719-llvm-5119923cdd7c2340ce669e57bf67cb7ac79724ac.zip
[clang-tidy] Skip misc-macro-parentheses for namespaces (Fix PR27400)
If a use of a macro argument is preceded by the `namespace` keyword, do not warn that the use should be wrapped in parentheses. Patch by Mads Ravn! llvm-svn: 269786
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp b/clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp
index 8f23a0991da..de83a827bfd 100644
--- a/clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp
+++ b/clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp
@@ -36,6 +36,7 @@
#define GOOD25(t) std::set<t,t,t> s
#define GOOD26(x) (a->*x)
#define GOOD27(x) (a.*x)
+#define GOOD28(x) namespace x {int b;}
// These are allowed for now..
#define MAYBE1 *12.34
OpenPOWER on IntegriCloud