llvm::SmallDenseMap<IdentifierInfo*, SourceLocation, 4> SeenAttrs;
bool AttrParsed = false;
- while (!Tok.isOneOf(tok::r_square, tok::semi)) {
+ while (!Tok.isOneOf(tok::r_square, tok::semi, tok::eof)) {
if (AttrParsed) {
// If we parsed an attribute, a comma is required before parsing any
// additional attributes.
[[,,maybe_unused,]] int Commas4; // ok
[[foo bar]] int NoComma; // expected-error {{expected ','}} \
// expected-warning {{unknown attribute 'foo' ignored}}
+// expected-error@+2 2 {{expected ']'}}
+// expected-error@+1 {{expected external declaration}}
+[[foo