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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 13 11:40:58 PDT 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/EvalEmitter.cpp:108
 
-  S.Current =
-      new InterpFrame(S, const_cast<Function *>(Func), S.Current, {}, {});
+  S.Current = new InterpFrame(S, const_cast<Function *>(Func), {});
   // Result of call will be on the stack and needs to be handled by the caller.
----------------
Not related to this review: it'd be nice to fix the interface so we get const correct behavior rather than needing to use `const_cast` like this.


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

https://reviews.llvm.org/D134699



More information about the cfe-commits mailing list