diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Parse/ParseExprCXX.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp index 10ae450fe89..445967bfab8 100644 --- a/clang/lib/Parse/ParseExprCXX.cpp +++ b/clang/lib/Parse/ParseExprCXX.cpp @@ -1085,6 +1085,11 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( // 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)) |