generated PHI node for the null check of a new operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86738
91177308-0d34-0410-b5e6-
96231b3b80d8
if (NullCheckResult) {
Builder.CreateBr(NewEnd);
+ NewNotNull = Builder.GetInsertBlock();
EmitBlock(NewNull);
Builder.CreateBr(NewEnd);
EmitBlock(NewEnd);
--- /dev/null
+// RUN: clang-cc -emit-llvm-only -verify %s
+// PR5454
+
+class X {static void * operator new(unsigned size) throw(); X(int); };
+int a(), b();
+void b(int x)
+{
+ new X(x ? a() : b());
+}
+