From fce12fdf6fecb20e4120bd8c897bb0c6ac97698c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 12 Dec 2008 06:21:41 +0000 Subject: rename recovery-3 to recovery.c llvm-svn: 60931 --- clang/test/Parser/recovery-3.c | 61 ------------------------------------------ clang/test/Parser/recovery.c | 61 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 61 deletions(-) delete mode 100644 clang/test/Parser/recovery-3.c create mode 100644 clang/test/Parser/recovery.c diff --git a/clang/test/Parser/recovery-3.c b/clang/test/Parser/recovery-3.c deleted file mode 100644 index ca922603722..00000000000 --- a/clang/test/Parser/recovery-3.c +++ /dev/null @@ -1,61 +0,0 @@ -// RUN: clang -fsyntax-only -verify -pedantic %s - -// PR2241 -float test2241[] = { - 1e, // expected-error {{exponent}} - 1ee0 // expected-error {{exponent}} -}; - - -// Testcase derived from PR2692 -static char *f (char * (*g) (char **, int), char **p, ...) { - char *s; - va_list v; // expected-error {{identifier}} - s = g (p, __builtin_va_arg(v, int)); // expected-error {{identifier}} expected-warning {{extension}} -} - - -// PR3172 -} // expected-error {{expected external declaration}} - - -// rdar://6094870 -int test(int) { - struct { int i; } x; - - if (x.hello) // expected-error {{no member named 'hello'}} - test(0); - else - ; - - if (x.hello == 0) // expected-error {{no member named 'hello'}} - test(0); - else - ; - - if ((x.hello == 0)) // expected-error {{no member named 'hello'}} - test(0); - else - ; - - if (x.i == 0)) // expected-error {{expected expression}} - test(0); - else - ; -} - - - -char (((( /* expected-note {{to match this '('}} */ - *X x ] )))); /* expected-error {{expected ')'}} */ - -; // expected-warning {{ISO C does not allow an extra ';' outside of a function}} - - - - -struct S { void *X, *Y; }; - -struct S A = { -&BADIDENT, 0 /* expected-error {{use of undeclared identifier}} */ -}; diff --git a/clang/test/Parser/recovery.c b/clang/test/Parser/recovery.c new file mode 100644 index 00000000000..ca922603722 --- /dev/null +++ b/clang/test/Parser/recovery.c @@ -0,0 +1,61 @@ +// RUN: clang -fsyntax-only -verify -pedantic %s + +// PR2241 +float test2241[] = { + 1e, // expected-error {{exponent}} + 1ee0 // expected-error {{exponent}} +}; + + +// Testcase derived from PR2692 +static char *f (char * (*g) (char **, int), char **p, ...) { + char *s; + va_list v; // expected-error {{identifier}} + s = g (p, __builtin_va_arg(v, int)); // expected-error {{identifier}} expected-warning {{extension}} +} + + +// PR3172 +} // expected-error {{expected external declaration}} + + +// rdar://6094870 +int test(int) { + struct { int i; } x; + + if (x.hello) // expected-error {{no member named 'hello'}} + test(0); + else + ; + + if (x.hello == 0) // expected-error {{no member named 'hello'}} + test(0); + else + ; + + if ((x.hello == 0)) // expected-error {{no member named 'hello'}} + test(0); + else + ; + + if (x.i == 0)) // expected-error {{expected expression}} + test(0); + else + ; +} + + + +char (((( /* expected-note {{to match this '('}} */ + *X x ] )))); /* expected-error {{expected ')'}} */ + +; // expected-warning {{ISO C does not allow an extra ';' outside of a function}} + + + + +struct S { void *X, *Y; }; + +struct S A = { +&BADIDENT, 0 /* expected-error {{use of undeclared identifier}} */ +}; -- cgit v1.2.3