We can't just use VisitCallExpr() here, as that doesn't handle CallExpr
subclasses such as CXXMemberCallExpr.
Differential Revision: https://reviews.llvm.org/D141772
if (!this->emitDupPtr(Initializer))
return false;
- return this->VisitCallExpr(CE);
+ return this->visit(CE);
} else if (const auto *DIE = dyn_cast<CXXDefaultInitExpr>(Initializer)) {
return this->visitInitializer(DIE->getExpr());
} else if (const auto *CE = dyn_cast<CastExpr>(Initializer)) {
int b;
constexpr C() : a(100), b(200) {}
+
+ constexpr C get() const {
+ return *this;
+ }
};
constexpr C c;
static_assert(c.a == 100, "");
static_assert(c.b == 200, "");
+constexpr C c2 = C().get();
+static_assert(c.a == 100, "");
+static_assert(c.b == 200, "");
+
constexpr int getB() {
C c;
int &j = c.b;