[cfe-commits] r142118 - /cfe/trunk/test/Misc/macro-backtrace.c
Chandler Carruth
chandlerc at gmail.com
Sun Oct 16 00:20:21 PDT 2011
Author: chandlerc
Date: Sun Oct 16 02:20:21 2011
New Revision: 142118
URL: http://llvm.org/viewvc/llvm-project?rev=142118&view=rev
Log:
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.
Modified:
cfe/trunk/test/Misc/macro-backtrace.c
Modified: cfe/trunk/test/Misc/macro-backtrace.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/macro-backtrace.c?rev=142118&r1=142117&r2=142118&view=diff
==============================================================================
--- cfe/trunk/test/Misc/macro-backtrace.c (original)
+++ cfe/trunk/test/Misc/macro-backtrace.c Sun Oct 16 02:20:21 2011
@@ -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 @@
// 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)) { }
}
More information about the cfe-commits
mailing list