]> granicus.if.org Git - clang/commitdiff
Fold two run lines into a single logical one, and move them down below
authorChandler Carruth <chandlerc@gmail.com>
Sun, 16 Oct 2011 07:20:21 +0000 (07:20 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 16 Oct 2011 07:20:21 +0000 (07:20 +0000)
the important code in this test to make the test more stable. Now adding
further tests won't shift the line numbers occuring in the diagnostic
output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142118 91177308-0d34-0410-b5e6-96231b3b80d8

test/Misc/macro-backtrace.c

index 94768242cd69591b72a573e44d230c16b597ef50..c5fde78d3affc230b89c2f3cf6eb1ef5c7220fc0 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -fmacro-backtrace-limit 5 %s > %t 2>&1 
-// RUN: FileCheck %s < %t
+// Tests for macro expansion backtraces. The RUN and CHECK lines are grouped
+// below the test code to reduce noise when updating them.
 
 #define M1(A, B) ((A) < (B))
 #define M2(A, B) M1(A, B)
@@ -15,7 +15,9 @@
 #define M12(A, B) M11(A, B)
 
 void f(int *ip, float *fp) {
-  // CHECK: macro-backtrace.c:31:7: warning: comparison of distinct pointer types ('int *' and 'float *')
+  if (M12(ip, fp)) { }
+  // RUN: %clang_cc1 -fsyntax-only -fmacro-backtrace-limit 5 %s 2>&1 | FileCheck %s
+  // CHECK: macro-backtrace.c:18:7: warning: comparison of distinct pointer types ('int *' and 'float *')
   // CHECK: if (M12(ip, fp)) { }
   // CHECK: macro-backtrace.c:15:19: note: expanded from:
   // CHECK: #define M12(A, B) M11(A, B)
@@ -28,5 +30,4 @@ void f(int *ip, float *fp) {
   // CHECK: #define M2(A, B) M1(A, B)
   // CHECK: macro-backtrace.c:4:23: note: expanded from:
   // CHECK: #define M1(A, B) ((A) < (B))
-  if (M12(ip, fp)) { }
 }