// compatible with GCC.
MaybeParseGNUAttributes(Attr, &DeclEndLoc);
+ // MSVC-style attributes must be parsed before the mutable specifier to be
+ // compatible with MSVC.
+ while (Tok.is(tok::kw___declspec))
+ ParseMicrosoftDeclSpec(Attr);
+
// Parse 'mutable'[opt].
SourceLocation MutableLoc;
if (TryConsumeToken(tok::kw_mutable, MutableLoc))
enum __declspec(novtable) E {}; // expected-warning{{'novtable' attribute only applies to classes}}
int __declspec(novtable) I; // expected-warning{{'novtable' attribute only applies to classes}}
typedef struct T __declspec(novtable) U; // expected-warning{{'novtable' attribute only applies to classes}}
+auto z = []() __declspec(novtable) { return nullptr; }; // expected-warning{{'novtable' attribute only applies to classes}}