[PATCH] D126062: [clang] Don't parse MS attributes in `ParseExportDeclaration()`.

Martin Böhme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 20 05:05:06 PDT 2022


mboehme created this revision.
Herald added a project: All.
mboehme requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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."


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126062

Files:
  clang/lib/Parse/ParseDeclCXX.cpp


Index: clang/lib/Parse/ParseDeclCXX.cpp
===================================================================
--- clang/lib/Parse/ParseDeclCXX.cpp
+++ clang/lib/Parse/ParseDeclCXX.cpp
@@ -438,7 +438,6 @@
     // FIXME: Factor out a ParseExternalDeclarationWithAttrs.
     ParsedAttributes Attrs(AttrFactory);
     MaybeParseCXX11Attributes(Attrs);
-    MaybeParseMicrosoftAttributes(Attrs);
     ParseExternalDeclaration(Attrs);
     return Actions.ActOnFinishExportDecl(getCurScope(), ExportDecl,
                                          SourceLocation());
@@ -458,7 +457,6 @@
          Tok.isNot(tok::eof)) {
     ParsedAttributes Attrs(AttrFactory);
     MaybeParseCXX11Attributes(Attrs);
-    MaybeParseMicrosoftAttributes(Attrs);
     ParseExternalDeclaration(Attrs);
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126062.430942.patch
Type: text/x-patch
Size: 779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220520/f30c5ee4/attachment.bin>


More information about the cfe-commits mailing list