aaron.ballman added inline comments.
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:726
+ } else if (const auto *IVIE = dyn_cast<ImplicitValueInitExpr>(Initializer)) {
+ auto ArrayType = IVIE->getType()->getAsArrayTypeUnsafe();
+ assert(ArrayType);
----------------
Please spell out the type.
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:728
+ assert(ArrayType);
+ const auto *CAT = dyn_cast<ConstantArrayType>(ArrayType);
+ const size_t NumElems = CAT->getSize().getZExtValue();
----------------
Should this be using `cast<>` as the code below is assuming this pointer will
never be null?
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:729
+ const auto *CAT = dyn_cast<ConstantArrayType>(ArrayType);
+ const size_t NumElems = CAT->getSize().getZExtValue();
+
----------------
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135013/new/
https://reviews.llvm.org/D135013
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits