From 6f4644d194da594562027a5d458d9fb7a20ebc39 Mon Sep 17 00:00:00 2001 From: Martin Boehme Date: Fri, 20 May 2022 14:04:44 +0200 Subject: [PATCH] [clang] Don't parse MS attributes in `ParseExportDeclaration()`. As @rsmith commented on https://reviews.llvm.org/D111548: "That looks like it's simply a bug as far as I can tell, and that call can be removed. MS attributes will be parsed as part of the decl specifier sequence as needed and don't need to be parsed as declaration attributes." Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D126062 --- clang/lib/Parse/ParseDeclCXX.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index 22ad9e030b0d..5ed989f17c1b 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -438,7 +438,6 @@ Decl *Parser::ParseExportDeclaration() { // FIXME: Factor out a ParseExternalDeclarationWithAttrs. ParsedAttributes Attrs(AttrFactory); MaybeParseCXX11Attributes(Attrs); - MaybeParseMicrosoftAttributes(Attrs); ParseExternalDeclaration(Attrs); return Actions.ActOnFinishExportDecl(getCurScope(), ExportDecl, SourceLocation()); @@ -458,7 +457,6 @@ Decl *Parser::ParseExportDeclaration() { Tok.isNot(tok::eof)) { ParsedAttributes Attrs(AttrFactory); MaybeParseCXX11Attributes(Attrs); - MaybeParseMicrosoftAttributes(Attrs); ParseExternalDeclaration(Attrs); }