diff options
Diffstat (limited to 'test/FixIt/fixit.c')
-rw-r--r-- | test/FixIt/fixit.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/FixIt/fixit.c b/test/FixIt/fixit.c index 83d724dffc01a..b799fa3b3b884 100644 --- a/test/FixIt/fixit.c +++ b/test/FixIt/fixit.c @@ -1,6 +1,8 @@ -// RUN: %clang_cc1 -pedantic -fixit %s -o - | grep -v 'CHECK' > %t -// RUN: %clang_cc1 -pedantic -Werror -x c - -// RUN: FileCheck -input-file=%t %s +// RUN: cp %s %t +// RUN: %clang_cc1 -pedantic -fixit -x c %t || true +// RUN: grep -v CHECK %t > %t2 +// RUN: %clang_cc1 -pedantic -Werror -x c %t +// RUN: FileCheck -input-file=%t2 %t /* This is a test of the various code modification hints that are provided as part of warning or extension diagnostics. All of the @@ -25,15 +27,14 @@ struct s s0 = { y: 5 }; // CHECK: int array0[5] = { [3] = 3 }; int array0[5] = { [3] 3 }; -void f1(x, y) +void f1(x, y) { } int i0 = { 17 }; -int f2(const char *my_string) { - // FIXME: terminal output isn't so good when "my_string" is shorter -// CHECK: return strcmp(my_string , "foo") == 0; - return my_string == "foo"; +int test_cond(int y, int fooBar) { +// CHECK: int x = y ? 1 : 4+fooBar; + int x = y ? 1 4+foobar; + return x; } - |