diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-12 22:12:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-12 22:12:26 +0000 |
commit | 33c6ebef6f9acad6eb667fff77ff78f0c169332c (patch) | |
tree | 721b4120702608528d3eb510c0d93454ba860e4e /test/Parser/declarators.c | |
parent | 798d5696ef5b4e3f47a6bed3c4f68f34c4810745 (diff) |
mark the declspec as invalid when we recover instead of forcing to int,
this allows downstream diags to be properly silenced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68917 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/declarators.c')
-rw-r--r-- | test/Parser/declarators.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/Parser/declarators.c b/test/Parser/declarators.c index 0b3f5cecd5..d8cd5b6586 100644 --- a/test/Parser/declarators.c +++ b/test/Parser/declarators.c @@ -12,7 +12,7 @@ char ((((*X)))); void (*signal(int, void (*)(int)))(int); -int a, ***C, * const D, B(int); +int aaaa, ***C, * const D, B(int); int *A; @@ -41,7 +41,7 @@ int (test5), ; // expected-error {{expected identifier or '('}} // PR3963 & rdar://6759604 - test error recovery for mistyped "typenames". foo_t *d; // expected-error {{unknown type name 'foo_t'}} -foo_t a = 4; // expected-error {{unknown type name 'foo_t'}} +foo_t a; // expected-error {{unknown type name 'foo_t'}} int test6() { return a; } // a should be declared. // Use of tagged type without tag. rdar://6783347 @@ -56,6 +56,8 @@ float *test7() { return &b.y; // expected-warning {{incompatible pointer types returning 'int *', expected 'float *'}} } +struct xyz test8() { return a; } // a should be be marked invalid, no diag. + // Verify that implicit int still works. static f; // expected-warning {{type specifier missing, defaults to 'int'}} |