summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/invalid-struct-init.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-03-12 07:56:15 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-03-12 07:56:15 +0000
commitc5b05520550a4becec926564bef032e60023cde2 (patch)
tree56702ee487460ed91285be86f6a23cc74d863edc /clang/test/Sema/invalid-struct-init.c
parent274d6f17771a2f75d6640de927ba997cc6caf38c (diff)
downloadbcm5719-llvm-c5b05520550a4becec926564bef032e60023cde2.tar.gz
bcm5719-llvm-c5b05520550a4becec926564bef032e60023cde2.zip
Fix parsing of type-specifier-seq's. Types are syntactically allowed to be
defined here, but not semantically, so new struct S {}; is always ill-formed, even if there is a struct S in scope. We also had a couple of bugs in ParseOptionalTypeSpecifier caused by it being under-loved (due to it only being used in a few places) so merge it into ParseDeclarationSpecifiers with a new DeclSpecContext. To avoid regressing, this required improving ParseDeclarationSpecifiers' diagnostics in some cases. This also required teaching ParseSpecifierQualifierList about constexpr... which incidentally fixes an issue where we'd allow the constexpr specifier in other bad places. llvm-svn: 152549
Diffstat (limited to 'clang/test/Sema/invalid-struct-init.c')
-rw-r--r--clang/test/Sema/invalid-struct-init.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/test/Sema/invalid-struct-init.c b/clang/test/Sema/invalid-struct-init.c
index a598d577f00..000d3ab59dc 100644
--- a/clang/test/Sema/invalid-struct-init.c
+++ b/clang/test/Sema/invalid-struct-init.c
@@ -3,8 +3,6 @@
typedef struct _zend_module_entry zend_module_entry;
struct _zend_module_entry {
_efree((p)); // expected-error{{type name requires a specifier or qualifier}} \
- expected-error{{field '_efree' declared as a function}} \
- expected-warning {{type specifier missing, defaults to 'int'}} \
expected-warning {{type specifier missing, defaults to 'int'}}
};
OpenPOWER on IntegriCloud