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 | 3ad26454307dc99262a762230a2c0d374193acb8 (patch) | |
| tree | 076c9479354f3ba0ab15463c3bd5922be71ce131 /clang/test | |
| parent | 852d6d64ffdb1c20d83cacf2cdc08e485b337804 (diff) | |
| download | bcm5719-llvm-3ad26454307dc99262a762230a2c0d374193acb8.tar.gz bcm5719-llvm-3ad26454307dc99262a762230a2c0d374193acb8.zip | |
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.
llvm-svn: 86738
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/new-operator-phi.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/new-operator-phi.cpp b/clang/test/CodeGenCXX/new-operator-phi.cpp new file mode 100644 index 00000000000..d4c698d0638 --- /dev/null +++ b/clang/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()); +} + |

