[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 8 11:33:24 PDT 2025


================
@@ -3035,11 +3035,14 @@ Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(
   }
 
   ParsedAttributes DeclSpecAttrs(AttrFactory);
-  MaybeParseMicrosoftAttributes(DeclSpecAttrs);
-
   // Hold late-parsed attributes so we can attach a Decl to them later.
   LateParsedAttrList CommonLateParsedAttrs;
 
+  while (MaybeParseCXX11Attributes(DeclAttrs) ||
----------------
DenisGZM wrote:

Yes, you right. But simply remove this line now will break diagnostics

In C23 investigations, I also found another differences that might be a bug. https://godbolt.org/z/E8Pc1zYK6
In `clang/lib/Parse/Parser.cpp:757` we parse all attributes and thus we accept `[[]]` attribute after `__attribute__` which isn't right for variable declarations in C23, I guess.

https://github.com/llvm/llvm-project/pull/133107


More information about the cfe-commits mailing list