[clang] [C23] Fix handling of alignas (PR #81637)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 13 10:00:24 PST 2024


================
@@ -3518,8 +3518,24 @@ void Parser::ParseDeclarationSpecifiers(
       DS.Finish(Actions, Policy);
       return;
 
-    case tok::l_square:
+    // alignment-specifier
+    case tok::kw__Alignas:
+      if (!getLangOpts().C11)
+        Diag(Tok, diag::ext_c11_feature) << Tok.getName();
----------------
AaronBallman wrote:

Yeah, we should probably add a compat warning here (and in a bunch of other places) -- perhaps a `good first issue`?

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


More information about the cfe-commits mailing list