diff options
author | James Y Knight <jyknight@google.com> | 2015-06-04 04:15:33 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2015-06-04 04:15:33 +0000 |
commit | 4c5901eefc7f22fe5e789535b783235d8c6e77ba (patch) | |
tree | de983ba99cb1d63e22f751c4c94986557950aa0a /clang/test/Frontend/source-col-map.c | |
parent | bdb4a39ad861f5a107a72bb488c83e167749d567 (diff) | |
download | bcm5719-llvm-4c5901eefc7f22fe5e789535b783235d8c6e77ba.tar.gz bcm5719-llvm-4c5901eefc7f22fe5e789535b783235d8c6e77ba.zip |
Fix fragile source-col-map.c test-case.
The test passing was dependent upon your source tree being checked out
in a directory with a long enough path, to cause the diagnostics to
wrap at the expected locations.
Use stdin instead, so that the error messages consistently use
<stdin> as the filename, and get wrapped consistently.
llvm-svn: 239009
Diffstat (limited to 'clang/test/Frontend/source-col-map.c')
-rw-r--r-- | clang/test/Frontend/source-col-map.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/Frontend/source-col-map.c b/clang/test/Frontend/source-col-map.c index a14023bc82a..ae69fbe565c 100644 --- a/clang/test/Frontend/source-col-map.c +++ b/clang/test/Frontend/source-col-map.c @@ -1,4 +1,4 @@ -// RUN: not %clang_cc1 %s -fsyntax-only -fmessage-length 75 -o /dev/null 2>&1 | FileCheck %s -strict-whitespace +// RUN: not %clang_cc1 -fsyntax-only -fmessage-length 75 -o /dev/null -x c < %s 2>&1 | FileCheck %s -strict-whitespace // Test case for the text diagnostics source column conversion crash. @@ -31,7 +31,8 @@ void test2(Unknown* b); // αααα αααα αααα αααα αααα αααΠvoid test3() { /* αααα αααα αααα αααα αααα αααα αααα αααα αααα αααα */ printf("%d", "s"); } -// CHECK: format specifies type 'int' but the argument has type 'char *' +// CHECK: format specifies type 'int' but the argument has +// CHECK: type 'char *' // CHECK-NEXT: ...αααα αααα αααα αααα αααα αααα αααα αααα αααα */ printf("%d", "s"); // CHECK-NEXT: {{^ ~~ \^~~$}} // CHECK-NEXT: {{^ %s$}} |