[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)
Dmitriy Chestnykh via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 5 12:45:35 PDT 2024
================
@@ -4428,10 +4428,14 @@ void Parser::ParseDeclarationSpecifiers(
// constexpr, consteval, constinit specifiers
case tok::kw_constexpr:
- if (getLangOpts().C23)
+ if (getLangOpts().C23) {
Diag(Tok, diag::warn_c23_compat_keyword) << Tok.getName();
- isInvalid = DS.SetConstexprSpec(ConstexprSpecKind::Constexpr, Loc,
- PrevSpec, DiagID);
+ isInvalid = DS.SetConstexprSpec(ConstexprSpecKind::Constexpr, Loc,
+ PrevSpec, DiagID);
+
+ isInvalid = DS.SetStorageClassSpec(Actions, DeclSpec::SCS_static, Loc,
----------------
chestnykh wrote:
I need to rework this PR a little bit
https://github.com/llvm/llvm-project/pull/97846
More information about the cfe-commits
mailing list