From 1aaddf2030a66762a97dc27265948694a1ecc546 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sun, 16 Oct 2011 07:20:21 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142118 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Misc/macro-backtrace.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/Misc/macro-backtrace.c b/test/Misc/macro-backtrace.c index 94768242cd..c5fde78d3a 100644 --- a/test/Misc/macro-backtrace.c +++ b/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)) { } } -- 2.40.0