[PATCH] D134699: [clang][Interp] Implement This pointer passing to methods

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 11 23:48:36 PDT 2022


tbaeder added inline comments.


================
Comment at: clang/test/AST/Interp/records.cpp:139
+                                  // ref-note {{in call to 'foo()'}}
+};
----------------
aaron.ballman wrote:
> The other thing I think we need some tests for are constructor and destructor calls where the `this` pointer may be a bit surprising because it needs adjustments. For example, with multiple inheritance where the `this` pointer may need to be adjusted to get to the fields of the object, and ensuring the correct constructors are called in the correct order.
> 
> Another case is with virtual functions (I'm assuming there's no vtable support yet and so that's less interesting, but it will become interesting once we get there so you may want to keep it in mind).
For constructors, see https://reviews.llvm.org/D135025. Although it doesn't test any sort of order I believe and destructors aren't part of that either.


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

https://reviews.llvm.org/D134699



More information about the cfe-commits mailing list