[PATCH] D119525: [clang] Fix crash when array size is missing in initializer

Timm B├Ąder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 11 08:13:29 PST 2022


tbaeder added inline comments.


================
Comment at: clang/lib/AST/StmtPrinter.cpp:2135
   std::string TypeS;
-  if (Optional<Expr *> Size = E->getArraySize()) {
+  if (E->isArray()) {
     llvm::raw_string_ostream s(TypeS);
----------------
I changed this just for clarity, not doing it did not cause any tests to fail. Not sure if this is tested at all.


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

https://reviews.llvm.org/D119525



More information about the cfe-commits mailing list