summaryrefslogtreecommitdiffstats
path: root/clang/test/Misc/macro-backtrace.c
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-10-16 07:20:21 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-10-16 07:20:21 +0000
commit33d64bf8e539159c869034038d397251709a28f3 (patch)
tree17690f8a252dfcca6b2b8c48e817f7734d1fdfe9 /clang/test/Misc/macro-backtrace.c
parent0ae8d4d73881b882676a680ba2857a271c5cc00a (diff)
downloadbcm5719-llvm-33d64bf8e539159c869034038d397251709a28f3.tar.gz
bcm5719-llvm-33d64bf8e539159c869034038d397251709a28f3.zip
Fold two run lines into a single logical one, and move them down below
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. llvm-svn: 142118
Diffstat (limited to 'clang/test/Misc/macro-backtrace.c')
-rw-r--r--clang/test/Misc/macro-backtrace.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/test/Misc/macro-backtrace.c b/clang/test/Misc/macro-backtrace.c
index 94768242cd6..c5fde78d3af 100644
--- a/clang/test/Misc/macro-backtrace.c
+++ b/clang/test/Misc/macro-backtrace.c
@@ -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)) { }
}
OpenPOWER on IntegriCloud