summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2017-10-12 10:41:22 +0000
committerAlexander Kornienko <alexfh@google.com>2017-10-12 10:41:22 +0000
commit7853351af8c8014c57a1c8b7d87faa0f9436f9cd (patch)
tree38275452a60762bbd6d25028d73dd7aa29302e9e
parent12ab07e0004b67752bcb4f91af2f33639422409a (diff)
downloadbcm5719-llvm-7853351af8c8014c57a1c8b7d87faa0f9436f9cd.tar.gz
bcm5719-llvm-7853351af8c8014c57a1c8b7d87faa0f9436f9cd.zip
Fix the google-readability-namespace-comments-cxx17 test after r315060.
Restore the file extension. Make the namespace longer than the ShortNamespaceLines so that the check triggers. llvm-svn: 315574
-rw-r--r--clang-tools-extra/test/clang-tidy/google-readability-namespace-comments-cxx1715
-rw-r--r--clang-tools-extra/test/clang-tidy/google-readability-namespace-comments-cxx17.cpp23
2 files changed, 23 insertions, 15 deletions
diff --git a/clang-tools-extra/test/clang-tidy/google-readability-namespace-comments-cxx17 b/clang-tools-extra/test/clang-tidy/google-readability-namespace-comments-cxx17
deleted file mode 100644
index 809feba1f3b..00000000000
--- a/clang-tools-extra/test/clang-tidy/google-readability-namespace-comments-cxx17
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %check_clang_tidy %s google-readability-namespace-comments %t -- -- -std=c++17
-
-namespace n1::n2 {
-namespace n3 {
- // So that namespace is not empty.
- void f();
-
-// CHECK-MESSAGES: :[[@LINE+4]]:2: warning: namespace 'n3' not terminated with
-// CHECK-MESSAGES: :[[@LINE-7]]:11: note: namespace 'n3' starts here
-// CHECK-MESSAGES: :[[@LINE+2]]:3: warning: namespace 'n1::n2' not terminated with a closing comment [google-readability-namespace-comments]
-// CHECK-MESSAGES: :[[@LINE-10]]:11: note: namespace 'n1::n2' starts here
-}}
-// CHECK-FIXES: } // namespace n3
-// CHECK-FIXES: } // namespace n1::n2
-
diff --git a/clang-tools-extra/test/clang-tidy/google-readability-namespace-comments-cxx17.cpp b/clang-tools-extra/test/clang-tidy/google-readability-namespace-comments-cxx17.cpp
new file mode 100644
index 00000000000..c8a0a8c743e
--- /dev/null
+++ b/clang-tools-extra/test/clang-tidy/google-readability-namespace-comments-cxx17.cpp
@@ -0,0 +1,23 @@
+// RUN: %check_clang_tidy %s google-readability-namespace-comments %t -- -- -std=c++17
+
+namespace n1::n2 {
+namespace n3 {
+ // So that namespace is not empty and has at least 10 lines.
+ // 1
+ // 2
+ // 3
+ // 3
+ // 4
+ // 5
+ // 6
+ // 7
+ // 8
+ void f();
+}}
+// CHECK-MESSAGES: :[[@LINE-1]]:2: warning: namespace 'n3' not terminated with
+// CHECK-MESSAGES: :[[@LINE-14]]:11: note: namespace 'n3' starts here
+// CHECK-MESSAGES: :[[@LINE-3]]:3: warning: namespace 'n1::n2' not terminated with a closing comment [google-readability-namespace-comments]
+// CHECK-MESSAGES: :[[@LINE-17]]:11: note: namespace 'n1::n2' starts here
+// CHECK-FIXES: } // namespace n3
+// CHECK-FIXES: } // namespace n1::n2
+
OpenPOWER on IntegriCloud