"expected ';' at end of declaration list")
DIAG(ext_expected_semi_decl_list, EXTENSION,
"expected ';' at end of declaration list")
+DIAG(err_expected_member_name_or_semi, ERROR,
+ "expected member name or ';' after declaration specifiers")
DIAG(err_function_declared_typedef, ERROR,
"function definition declared 'typedef'")
DIAG(err_expected_fn_body, ERROR,
// portion is empty), if an abstract-declarator is allowed.
D.SetIdentifier(0, Tok.getLocation());
} else {
- if (getLang().CPlusPlus)
+ if (D.getContext() == Declarator::MemberContext)
+ Diag(Tok, diag::err_expected_member_name_or_semi)
+ << D.getDeclSpec().getSourceRange();
+ else if (getLang().CPlusPlus)
Diag(Tok, diag::err_expected_unqualified_id);
else
Diag(Tok, diag::err_expected_ident_lparen);
class C {
- using namespace B ; // expected-error{{expected unqualified-id}}
+ using namespace B ; // expected-error{{expected member name or ';' after declaration specifiers}}
//FIXME: this needs better error message
};
};
};
+// PR3680
struct {}; // expected-error{{declaration does not declare anything}}
+
+struct s2 {
+ union {
+ int a;
+ }
+}; // expected-error{{expected member name or ';' after declaration specifiers}}