void f(int *ip, float *fp) {
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)
- // CHECK: macro-backtrace.c:14:19: note: expanded from:
- // CHECK: #define M11(A, B) M10(A, B)
- // CHECK: note: (skipping 7 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
- // CHECK: macro-backtrace.c:6:18: note: expanded from:
- // CHECK: #define M3(A, B) M2(A, B)
- // CHECK: macro-backtrace.c:5:18: note: expanded from:
- // CHECK: #define M2(A, B) M1(A, B)
- // CHECK: macro-backtrace.c:4:23: note: expanded from:
- // CHECK: #define M1(A, B) ((A) < (B))
+ // RUN: %clang_cc1 -fsyntax-only -fmacro-backtrace-limit 5 %s 2>&1 \
+ // RUN: | FileCheck %s -check-prefix=CHECK-LIMIT
+ // CHECK-LIMIT: macro-backtrace.c:18:7: warning: comparison of distinct pointer types ('int *' and 'float *')
+ // CHECK-LIMIT: if (M12(ip, fp)) { }
+ // CHECK-LIMIT: macro-backtrace.c:15:19: note: expanded from:
+ // CHECK-LIMIT: #define M12(A, B) M11(A, B)
+ // CHECK-LIMIT: macro-backtrace.c:14:19: note: expanded from:
+ // CHECK-LIMIT: #define M11(A, B) M10(A, B)
+ // CHECK-LIMIT: note: (skipping 7 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
+ // CHECK-LIMIT: macro-backtrace.c:6:18: note: expanded from:
+ // CHECK-LIMIT: #define M3(A, B) M2(A, B)
+ // CHECK-LIMIT: macro-backtrace.c:5:18: note: expanded from:
+ // CHECK-LIMIT: #define M2(A, B) M1(A, B)
+ // CHECK-LIMIT: macro-backtrace.c:4:23: note: expanded from:
+ // CHECK-LIMIT: #define M1(A, B) ((A) < (B))
}