[clang-tools-extra] r343198 - [clang-tidy] use CHECK-NOTES in tests for bugprone-forward-declaration-namespace

Jonas Toth via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 27 05:17:59 PDT 2018


Author: jonastoth
Date: Thu Sep 27 05:17:59 2018
New Revision: 343198

URL: http://llvm.org/viewvc/llvm-project?rev=343198&view=rev
Log:
[clang-tidy] use CHECK-NOTES in tests for bugprone-forward-declaration-namespace

Reviewers: aaron.ballman, alexfh, hokein

Subscribers: xazax.hun, cfe-commits

Differential Revision: https://reviews.llvm.org/D52185

Modified:
    clang-tools-extra/trunk/test/clang-tidy/bugprone-forward-declaration-namespace.cpp

Modified: clang-tools-extra/trunk/test/clang-tidy/bugprone-forward-declaration-namespace.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/bugprone-forward-declaration-namespace.cpp?rev=343198&r1=343197&r2=343198&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/bugprone-forward-declaration-namespace.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/bugprone-forward-declaration-namespace.cpp Thu Sep 27 05:17:59 2018
@@ -3,19 +3,19 @@
 namespace {
 // This is a declaration in a wrong namespace.
 class T_A;
-// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration 'T_A' is never referenced, but a declaration with the same name found in another namespace 'na' [bugprone-forward-declaration-namespace]
-// CHECK-MESSAGES: note: a declaration of 'T_A' is found here
-// CHECK-MESSAGES: :[[@LINE-3]]:7: warning: no definition found for 'T_A', but a definition with the same name 'T_A' found in another namespace '(global)' [bugprone-forward-declaration-namespace]
-// CHECK-MESSAGES: note: a definition of 'T_A' is found here
+// CHECK-NOTES: :[[@LINE-1]]:7: warning: declaration 'T_A' is never referenced, but a declaration with the same name found in another namespace 'na' [bugprone-forward-declaration-namespace]
+// CHECK-NOTES: note: a declaration of 'T_A' is found here
+// CHECK-NOTES: :[[@LINE-3]]:7: warning: no definition found for 'T_A', but a definition with the same name 'T_A' found in another namespace '(global)' [bugprone-forward-declaration-namespace]
+// CHECK-NOTES: note: a definition of 'T_A' is found here
 }
 
 namespace na {
 // This is a declaration in a wrong namespace.
 class T_A;
-// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration 'T_A' is never referenced, but a declaration with the same name found in another namespace '(anonymous)'
-// CHECK-MESSAGES: note: a declaration of 'T_A' is found here
-// CHECK-MESSAGES: :[[@LINE-3]]:7: warning: no definition found for 'T_A', but a definition with the same name 'T_A' found in another namespace '(global)'
-// CHECK-MESSAGES: note: a definition of 'T_A' is found here
+// CHECK-NOTES: :[[@LINE-1]]:7: warning: declaration 'T_A' is never referenced, but a declaration with the same name found in another namespace '(anonymous)'
+// CHECK-NOTES: note: a declaration of 'T_A' is found here
+// CHECK-NOTES: :[[@LINE-3]]:7: warning: no definition found for 'T_A', but a definition with the same name 'T_A' found in another namespace '(global)'
+// CHECK-NOTES: note: a definition of 'T_A' is found here
 }
 
 class T_A;
@@ -25,8 +25,8 @@ class T_A {
 };
 
 class NESTED;
-// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: no definition found for 'NESTED', but a definition with the same name 'NESTED' found in another namespace '(anonymous namespace)::nq::(anonymous)'
-// CHECK-MESSAGES: note: a definition of 'NESTED' is found here
+// CHECK-NOTES: :[[@LINE-1]]:7: warning: no definition found for 'NESTED', but a definition with the same name 'NESTED' found in another namespace '(anonymous namespace)::nq::(anonymous)'
+// CHECK-NOTES: note: a definition of 'NESTED' is found here
 
 namespace {
 namespace nq {
@@ -38,10 +38,10 @@ class NESTED {};
 
 namespace na {
 class T_B;
-// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration 'T_B' is never referenced, but a declaration with the same name found in another namespace 'nb'
-// CHECK-MESSAGES: note: a declaration of 'T_B' is found here
-// CHECK-MESSAGES: :[[@LINE-3]]:7: warning: no definition found for 'T_B', but a definition with the same name 'T_B' found in another namespace 'nb'
-// CHECK-MESSAGES: note: a definition of 'T_B' is found here
+// CHECK-NOTES: :[[@LINE-1]]:7: warning: declaration 'T_B' is never referenced, but a declaration with the same name found in another namespace 'nb'
+// CHECK-NOTES: note: a declaration of 'T_B' is found here
+// CHECK-NOTES: :[[@LINE-3]]:7: warning: no definition found for 'T_B', but a definition with the same name 'T_B' found in another namespace 'nb'
+// CHECK-NOTES: note: a definition of 'T_B' is found here
 }
 
 namespace nb {
@@ -56,10 +56,10 @@ class T_B {
 
 namespace na {
 class T_B;
-// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration 'T_B' is never referenced, but a declaration with the same name found in another namespace 'nb'
-// CHECK-MESSAGES: note: a declaration of 'T_B' is found here
-// CHECK-MESSAGES: :[[@LINE-3]]:7: warning: no definition found for 'T_B', but a definition with the same name 'T_B' found in another namespace 'nb'
-// CHECK-MESSAGES: note: a definition of 'T_B' is found here
+// CHECK-NOTES: :[[@LINE-1]]:7: warning: declaration 'T_B' is never referenced, but a declaration with the same name found in another namespace 'nb'
+// CHECK-NOTES: note: a declaration of 'T_B' is found here
+// CHECK-NOTES: :[[@LINE-3]]:7: warning: no definition found for 'T_B', but a definition with the same name 'T_B' found in another namespace 'nb'
+// CHECK-NOTES: note: a definition of 'T_B' is found here
 }
 
 // A simple forward declaration. Although it is never used, but no declaration
@@ -89,8 +89,8 @@ void f(OUTSIDER_1 *);
 
 namespace nb {
 class OUTSIDER_1;
-// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration 'OUTSIDER_1' is never referenced, but a declaration with the same name found in another namespace 'na'
-// CHECK-MESSAGES: note: a declaration of 'OUTSIDER_1' is found here
+// CHECK-NOTES: :[[@LINE-1]]:7: warning: declaration 'OUTSIDER_1' is never referenced, but a declaration with the same name found in another namespace 'na'
+// CHECK-NOTES: note: a declaration of 'OUTSIDER_1' is found here
 }
 
 
@@ -139,8 +139,8 @@ extern template class T_TEMP_1<char>;
 
 namespace nd {
 class D;
-// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration 'D' is never referenced, but a declaration with the same name found in another namespace 'nd::ne'
-// CHECK-MESSAGES: note: a declaration of 'D' is found here
+// CHECK-NOTES: :[[@LINE-1]]:7: warning: declaration 'D' is never referenced, but a declaration with the same name found in another namespace 'nd::ne'
+// CHECK-NOTES: note: a declaration of 'D' is found here
 }
 
 namespace nd {




More information about the cfe-commits mailing list