[PATCH] D158615: [clang] Emit an error if variable ends up with incomplete array type

Mariya Podchishchaeva via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 23 07:10:50 PDT 2023


Fznamznon added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:13460
+          // initializer.
+          Diag(VDecl->getLocation(), diag::err_typecheck_decl_incomplete_type)
+              << VDeclType;
----------------
Not sure about the error message though, maybe it makes sense to add a message similar to `err_new_array_size_unknown_from_init` .


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158615/new/

https://reviews.llvm.org/D158615



More information about the cfe-commits mailing list