summaryrefslogtreecommitdiffstats
path: root/test/Misc/caret-diags-macros.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-05-02 19:39:53 +0000
committerdim <dim@FreeBSD.org>2011-05-02 19:39:53 +0000
commit110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab (patch)
tree64a10f4c4154739d4a8191d7e1b52ce497f4ebd6 /test/Misc/caret-diags-macros.c
parenta0fb00f9837bd0d2e5948f16f6a6b82a7a628f51 (diff)
downloadFreeBSD-src-110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab.zip
FreeBSD-src-110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab.tar.gz
Vendor import of clang trunk r130700:
http://llvm.org/svn/llvm-project/cfe/trunk@130700
Diffstat (limited to 'test/Misc/caret-diags-macros.c')
-rw-r--r--test/Misc/caret-diags-macros.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/test/Misc/caret-diags-macros.c b/test/Misc/caret-diags-macros.c
index e138f59..e45ad2a 100644
--- a/test/Misc/caret-diags-macros.c
+++ b/test/Misc/caret-diags-macros.c
@@ -1,27 +1,24 @@
-// RUN: %clang_cc1 -fsyntax-only %s > %t 2>&1
+// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck %s
#define M1(x) x
-
-// RUN: grep ":6:12: note: instantiated from:" %t
#define M2 1;
-
void foo() {
- // RUN: grep ":10:2: warning: expression result unused" %t
- M1(
- // RUN: grep ":12:5: note: instantiated from:" %t
- M2)
+ M1(
+ M2);
+ // CHECK: {{.*}}:6:{{[0-9]+}}: warning: expression result unused
+ // CHECK: {{.*}}:7:{{[0-9]+}}: note: instantiated from:
+ // CHECK: {{.*}}:4:{{[0-9]+}}: note: instantiated from:
}
-// RUN: grep ":16:11: note: instantiated from:" %t
#define A 1
-// RUN: grep ":18:11: note: instantiated from:" %t
#define B A
-// RUN: grep ":20:11: note: instantiated from:" %t
#define C B
-
void bar() {
- // RUN: grep ":24:3: warning: expression result unused" %t
C;
+ // CHECK: {{.*}}:17:{{[0-9]+}}: warning: expression result unused
+ // CHECK: {{.*}}:15:{{[0-9]+}}: note: instantiated from:
+ // CHECK: {{.*}}:14:{{[0-9]+}}: note: instantiated from:
+ // CHECK: {{.*}}:13:{{[0-9]+}}: note: instantiated from:
}
OpenPOWER on IntegriCloud