summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/declspec.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-02 17:32:27 +0000
committerChris Lattner <sabre@nondot.org>2010-02-02 17:32:27 +0000
commitafe6a840d4ad4695bc25db9e99376678e1dd42ec (patch)
tree2a854d69c441928162ba3248d46a5a2a4add270f /clang/test/Sema/declspec.c
parentffa70e8b270ed348a86ce7d064dc32b7db427767 (diff)
downloadbcm5719-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.c3
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.
OpenPOWER on IntegriCloud