]> granicus.if.org Git - clang/commit
An operator new with an empty exception specifier returns null on a bad
authorJohn McCall <rjmccall@apple.com>
Mon, 7 Mar 2011 01:52:56 +0000 (01:52 +0000)
committerJohn McCall <rjmccall@apple.com>
Mon, 7 Mar 2011 01:52:56 +0000 (01:52 +0000)
commita7f633f522af786e80dc08dbd63e222c9414095b
tree4ada9ad427b1a0b97bbfd52b6f94745f73d76fad
parent03fd362dbf6fcd077df566fe2ac3165be668323b
An operator new with an empty exception specifier returns null on a bad
allocation and therefore requires a null-check.  We were doing that, but
we weren't treating the new-initializer as being conditionally executed,
which means it was possible to get ill-formed IR as in PR9298.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127147 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExprCXX.cpp
test/CodeGenCXX/exceptions.cpp