converting from std::nullptr_t, the subexpression might have side-effects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154278
91177308-0d34-0410-b5e6-
96231b3b80d8
return HandleBaseToDerivedCast(Info, E, Result);
case CK_NullToPointer:
+ VisitIgnoredValue(E->getSubExpr());
return ZeroInitialization(E);
case CK_IntegralToPointer: {
return ExprEvaluatorBaseTy::VisitCastExpr(E);
case CK_NullToMemberPointer:
+ VisitIgnoredValue(E->getSubExpr());
return ZeroInitialization(E);
case CK_BaseToDerivedMemberPointer: {
consume(a);
}
}
+
+namespace Null {
+ decltype(nullptr) null();
+ // CHECK: call {{.*}} @_ZN4Null4nullEv(
+ int *p = null();
+ struct S {};
+ // CHECK: call {{.*}} @_ZN4Null4nullEv(
+ int S::*q = null();
+}