[PATCH] D156027: [clang][Interp] Rework how initializers work

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 28 12:38:59 PDT 2023


tbaeder marked an inline comment as done.
tbaeder added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:2090
+      assert(Initializing);
+      if (!isa<CXXMemberCallExpr>(E)) {
+        if (!this->emitDupPtr(E))
----------------
aaron.ballman wrote:
> And if it is a member call expression?
For member calls, the layout at this point is:

```
ThisPtr
RVOPtr
RVOPtr
```
(top of the stack is where we're at). The dup here is supposed to dup the RVO ptr, but we can't do that for member calls because the top is currently the instance pointer. Tha'ts why `VisitCXXMemberCallExpr()` handles this separately.


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

https://reviews.llvm.org/D156027



More information about the cfe-commits mailing list