diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-11-10 22:39:09 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-11-10 22:39:09 +0000 |
commit | 7f1de456fe6b6fb6d3fb8144df6173d2354f595a (patch) | |
tree | c9ec8c29e098eac40ec9fe666129c57cb3dc2a2f /test/CodeGenCXX/new-operator-phi.cpp | |
parent | 69a2c268dbc2844bbdecfbbbb82602e6bb4bd1df (diff) |
Fix for PR5454: make sure to use the right block as the predecessor in the
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
Diffstat (limited to 'test/CodeGenCXX/new-operator-phi.cpp')
-rw-r--r-- | test/CodeGenCXX/new-operator-phi.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenCXX/new-operator-phi.cpp b/test/CodeGenCXX/new-operator-phi.cpp new file mode 100644 index 0000000000..d4c698d063 --- /dev/null +++ b/test/CodeGenCXX/new-operator-phi.cpp @@ -0,0 +1,10 @@ +// 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()); +} + |