[PATCH] D99338: [clang][parser] Allow GNU-style attributes in enum specifiers

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 26 02:06:05 PDT 2021


tbaeder updated this revision to Diff 333511.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99338/new/

https://reviews.llvm.org/D99338

Files:
  clang/lib/Parse/ParseDecl.cpp


Index: clang/lib/Parse/ParseDecl.cpp
===================================================================
--- clang/lib/Parse/ParseDecl.cpp
+++ clang/lib/Parse/ParseDecl.cpp
@@ -4653,7 +4653,8 @@
   // or opaque-enum-declaration anywhere.
   if (IsElaboratedTypeSpecifier && !getLangOpts().MicrosoftExt &&
       !getLangOpts().ObjC) {
-    ProhibitAttributes(attrs);
+    ProhibitCXX11Attributes(attrs, diag::err_attributes_not_allowed,
+                            /*DiagnoseEmptyAttrs=*/true);
     if (BaseType.isUsable())
       Diag(BaseRange.getBegin(), diag::ext_enum_base_in_type_specifier)
           << (AllowEnumSpecifier == AllowDefiningTypeSpec::Yes) << BaseRange;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99338.333511.patch
Type: text/x-patch
Size: 678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210326/a99267e0/attachment.bin>


More information about the cfe-commits mailing list