File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -3056,13 +3056,16 @@ class Parser : public CodeCompletionHandler {
30563056 bool CouldBeBitField = false );
30573057 Decl *ParseHLSLBuffer (SourceLocation &DeclEnd);
30583058
3059- void MaybeParseMicrosoftAttributes (ParsedAttributes &Attrs) {
3059+ bool MaybeParseMicrosoftAttributes (ParsedAttributes &Attrs) {
3060+ bool AttrsParsed = false ;
30603061 if ((getLangOpts ().MicrosoftExt || getLangOpts ().HLSL ) &&
30613062 Tok.is (tok::l_square)) {
30623063 ParsedAttributes AttrsWithRange (AttrFactory);
30633064 ParseMicrosoftAttributes (AttrsWithRange);
3065+ AttrsParsed = AttrsWithRange.size ();
30643066 Attrs.takeAllFrom (AttrsWithRange);
30653067 }
3068+ return AttrsParsed;
30663069 }
30673070 void ParseMicrosoftUuidAttributeArgs (ParsedAttributes &Attrs);
30683071 void ParseMicrosoftAttributes (ParsedAttributes &Attrs);
Original file line number Diff line number Diff line change @@ -3037,12 +3037,12 @@ Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(
30373037 ParsedAttributes DeclSpecAttrs (AttrFactory);
30383038 // Hold late-parsed attributes so we can attach a Decl to them later.
30393039 LateParsedAttrList CommonLateParsedAttrs;
3040+
30403041 while (MaybeParseCXX11Attributes (DeclAttrs) ||
3041- MaybeParseGNUAttributes (DeclSpecAttrs, &CommonLateParsedAttrs)) {
3042+ MaybeParseGNUAttributes (DeclSpecAttrs, &CommonLateParsedAttrs) ||
3043+ MaybeParseMicrosoftAttributes (DeclSpecAttrs)) {
30423044 }
30433045
3044- MaybeParseMicrosoftAttributes (DeclSpecAttrs);
3045-
30463046 // decl-specifier-seq:
30473047 // Parse the common declaration-specifiers piece.
30483048 ParsingDeclSpec DS (*this , TemplateDiags);
You can’t perform that action at this time.
0 commit comments