diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-02 17:32:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-02 17:32:27 +0000 |
commit | afe6a840d4ad4695bc25db9e99376678e1dd42ec (patch) | |
tree | 2a854d69c441928162ba3248d46a5a2a4add270f /clang/test/Sema/declspec.c | |
parent | ffa70e8b270ed348a86ce7d064dc32b7db427767 (diff) | |
download | bcm5719-llvm-afe6a840d4ad4695bc25db9e99376678e1dd42ec.tar.gz bcm5719-llvm-afe6a840d4ad4695bc25db9e99376678e1dd42ec.zip |
the declspec of a declaration can have storage-class specifiers,
type qualifiers and type specifiers in any order. For example,
this is valid: struct x {...} typedef y;
This fixes PR6208.
llvm-svn: 95094
Diffstat (limited to 'clang/test/Sema/declspec.c')
-rw-r--r-- | clang/test/Sema/declspec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Sema/declspec.c b/clang/test/Sema/declspec.c index e1f2bf4911a..d9f4157ab3d 100644 --- a/clang/test/Sema/declspec.c +++ b/clang/test/Sema/declspec.c @@ -8,8 +8,11 @@ void foof(const char *, ...) __attribute__((__format__(__printf__, 1, 2))), barf int typedef validTypeDecl() { } // expected-error {{function definition declared 'typedef'}} struct _zend_module_entry { } // expected-error {{expected ';' after struct}} +int gv1; typedef struct _zend_function_entry { } // expected-error {{expected ';' after struct}} \ // expected-error {{declaration does not declare anything}} +int gv2; + static void buggy(int *x) { } // Type qualifiers. |