[clang-tools-extra] r315574 - Fix the google-readability-namespace-comments-cxx17 test after r315060.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 12 03:41:22 PDT 2017


Author: alexfh
Date: Thu Oct 12 03:41:22 2017
New Revision: 315574

URL: http://llvm.org/viewvc/llvm-project?rev=315574&view=rev
Log:
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.

Added:
    clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments-cxx17.cpp
Removed:
    clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments-cxx17

Removed: clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments-cxx17
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments-cxx17?rev=315573&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments-cxx17 (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments-cxx17 (removed)
@@ -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
-

Added: clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments-cxx17.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments-cxx17.cpp?rev=315574&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments-cxx17.cpp (added)
+++ clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments-cxx17.cpp Thu Oct 12 03:41:22 2017
@@ -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
+




More information about the cfe-commits mailing list