[clang] [Clang] disallow constexpr with auto and explicit type in C23 (PR #163469)
Oleksandr T. via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 16 05:50:40 PDT 2025
================
@@ -1369,7 +1369,7 @@ void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {
if (S.getLangOpts().C23 &&
getConstexprSpecifier() == ConstexprSpecKind::Constexpr &&
- StorageClassSpec == SCS_extern) {
+ (StorageClassSpec == SCS_extern || StorageClassSpec == SCS_auto)) {
----------------
a-tarasyuk wrote:
@Fznamznon Sorry, I’ve added an additional check for the type specifier.
https://github.com/llvm/llvm-project/pull/163469
More information about the cfe-commits
mailing list