[Openmp-commits] [clang-tools-extra] [clang] [libcxxabi] [libunwind] [libcxx] [openmp] [libc] [flang] [llvm] [mlir] [lld] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

Mariya Podchishchaeva via Openmp-commits openmp-commits at lists.llvm.org
Thu Nov 30 02:14:03 PST 2023


================
@@ -8857,7 +8894,9 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {
 
   if (NewVD->isConstexpr() && !T->isDependentType() &&
       RequireLiteralType(NewVD->getLocation(), T,
-                         diag::err_constexpr_var_non_literal)) {
+                         getLangOpts().C23
+                             ? diag::err_c23_constexpr_invalid_type
+                             : diag::err_constexpr_var_non_literal)) {
----------------
Fznamznon wrote:

Ok, I moved VLA check to `CheckC23ConstexprVarTypeQualifiers` renaming it to `CheckC23ConstexprVarType`.

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


More information about the Openmp-commits mailing list