[PATCH] D136694: [clang][Interp] Check that constructor calls initialize all record fields

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 1 08:25:36 PST 2022


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: clang/lib/AST/Interp/Interp.h:1346-1347
   if (Func->hasThisPointer()) {
+    ThisPtr = NewFrame->getThis();
     if (!CheckInvoke(S, PC, NewFrame->getThis())) {
       return false;
----------------
tbaeder wrote:
> aaron.ballman wrote:
> > Should we assert that `ThisPtr` is valid?
> We could only assert `!isZero()` as far as I understand, but that's part of what `CheckInvoke` does.
Ah, then no need.


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

https://reviews.llvm.org/D136694



More information about the cfe-commits mailing list