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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 11 10:56:51 PDT 2022


aaron.ballman added inline comments.


================
Comment at: clang/test/AST/Interp/records.cpp:139
+                                  // ref-note {{in call to 'foo()'}}
+};
----------------
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).


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

https://reviews.llvm.org/D134699



More information about the cfe-commits mailing list