================
@@ -7894,6 +7898,17 @@ NamedDecl *Sema::ActOnVariableDeclarator(
(getLangOpts().CPlusPlus17 ||
Context.getTargetInfo().getCXXABI().isMicrosoft()))
NewVD->setImplicitlyInline();
+
+ if (getLangOpts().C23) {
+ DeclSpec::TSCS TSC = D.getDeclSpec().getThreadStorageClassSpec();
+ if (TSC != TSCS_unspecified) {
+ Diag(D.getDeclSpec().getThreadStorageClassSpecLoc(),
+ diag::err_c23_thread_local_constexpr);
+ }
+ if (NewVD->hasExternalStorage())
+ Diag(D.getDeclSpec().getThreadStorageClassSpecLoc(),
+ diag::err_c23_extern_constexpr);
----------------
AaronBallman wrote:
I think this is better handled by `DeclSpec::Finish()`, WDYT?
https://github.com/llvm/llvm-project/pull/73099
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits