[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 26 09:13:53 PST 2024


================
@@ -5140,6 +5140,8 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
       Diag(DS.getConstexprSpecLoc(), diag::err_constexpr_tag)
           << GetDiagnosticTypeSpecifierID(DS)
           << static_cast<int>(DS.getConstexprSpecifier());
+    else if (getLangOpts().C23)
+      Diag(DS.getConstexprSpecLoc(), diag::err_c23_constexpr_not_variable);
----------------
Fznamznon wrote:

Ignoring per https://github.com/llvm/llvm-project/pull/73099#discussion_r1491320091 .

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


More information about the cfe-commits mailing list