aboutsummaryrefslogtreecommitdiff
path: root/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
commit69730c115c2d0fec2f20609d905d920a5a41b29b (patch)
treee55b4541891864011b04424697b3619e3a5799ca /test/Sema/invalid-struct-init.c
parent0be8fb5bdfe7e07a57f07a740649ec8bfb690284 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/invalid-struct-init.c')
-rw-r--r--test/Sema/invalid-struct-init.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/test/Sema/invalid-struct-init.c b/test/Sema/invalid-struct-init.c
index a598d577f0..000d3ab59d 100644
--- a/test/Sema/invalid-struct-init.c
+++ b/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'}}
};