return false;
BaseTy = E->getBase()->getType()->getAs<PointerType>()->getPointeeType();
} else if (E->getBase()->isRValue()) {
+ if (!E->getBase()->getType()->isRecordType() ||
+ !E->getBase()->getType()->isLiteralType())
+ return false;
if (!EvaluateTemporary(E->getBase(), Result, this->Info))
return false;
BaseTy = E->getBase()->getType();
static_assert(makeComplexWrap(1,0) != complex(0, 1), "");
}
+
+namespace PR11595 {
+ struct A { constexpr bool operator==(int x) { return true; } };
+ struct B { B(); ~B(); A& x; };
+ static_assert(B().x == 3, ""); // expected-error {{constant expression}}
+}