[PATCH] D52686: [clang-tidy] NFC use CHECK-NOTES in test for cppgoreguidelines-avoid-goto

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 2 02:41:07 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL343565: [clang-tidy] NFC use CHECK-NOTES in test for cppgoreguidelines-avoid-goto (authored by JonasToth, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D52686

Files:
  clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-avoid-goto.cpp


Index: clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-avoid-goto.cpp
===================================================================
--- clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-avoid-goto.cpp
+++ clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-avoid-goto.cpp
@@ -5,23 +5,23 @@
 int main() {
   noop();
   goto jump_to_me;
-  // CHECK-MESSAGES: [[@LINE-1]]:3: warning: avoid using 'goto' for flow control
-  // CHECK-MESSAGES: [[@LINE+3]]:1: note: label defined here
+  // CHECK-NOTES: [[@LINE-1]]:3: warning: avoid using 'goto' for flow control
+  // CHECK-NOTES: [[@LINE+3]]:1: note: label defined here
   noop();
 
 jump_to_me:;
 
 jump_backwards:;
   noop();
   goto jump_backwards;
-  // CHECK-MESSAGES: [[@LINE-1]]:3: warning: avoid using 'goto' for flow control
-  // CHECK-MESSAGES: [[@LINE-4]]:1: note: label defined here
+  // CHECK-NOTES: [[@LINE-1]]:3: warning: avoid using 'goto' for flow control
+  // CHECK-NOTES: [[@LINE-4]]:1: note: label defined here
 
   goto jump_in_line;
   ;
 jump_in_line:;
-  // CHECK-MESSAGES: [[@LINE-3]]:3: warning: avoid using 'goto' for flow control
-  // CHECK-MESSAGES: [[@LINE-2]]:1: note: label defined here
+  // CHECK-NOTES: [[@LINE-3]]:3: warning: avoid using 'goto' for flow control
+  // CHECK-NOTES: [[@LINE-2]]:1: note: label defined here
 
   // Test the GNU extension https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
 some_label:;
@@ -132,8 +132,8 @@
     for (int j = 0; j < 10; ++j) {
       if (i * j > 80)
         goto before_the_loop;
-      // CHECK-MESSAGES: [[@LINE-1]]:9: warning: avoid using 'goto' for flow control
-      // CHECK-MESSAGES: [[@LINE-8]]:1: note: label defined here
+      // CHECK-NOTES: [[@LINE-1]]:9: warning: avoid using 'goto' for flow control
+      // CHECK-NOTES: [[@LINE-8]]:1: note: label defined here
     }
   }
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52686.167899.patch
Type: text/x-patch
Size: 1863 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181002/a41b53a5/attachment-0001.bin>


More information about the cfe-commits mailing list