summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/new.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-06-01 00:05:16 +0000
committerAnders Carlsson <andersca@mac.com>2009-06-01 00:05:16 +0000
commitca50119a31d335b46dcc9940f6f6fd6cabe8ea33 (patch)
tree1d11fc75af29b8aeeae18f916a749d6488d199d5 /clang/test/CodeGenCXX/new.cpp
parentcba81fc4de83b0ffa430c94b9ad88b8cf7bb1622 (diff)
downloadbcm5719-llvm-ca50119a31d335b46dcc9940f6f6fd6cabe8ea33.tar.gz
bcm5719-llvm-ca50119a31d335b46dcc9940f6f6fd6cabe8ea33.zip
Check for null correctly for new expressions.
llvm-svn: 72678
Diffstat (limited to 'clang/test/CodeGenCXX/new.cpp')
-rw-r--r--clang/test/CodeGenCXX/new.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/new.cpp b/clang/test/CodeGenCXX/new.cpp
index e3d1ec1df6c..70ad269d24a 100644
--- a/clang/test/CodeGenCXX/new.cpp
+++ b/clang/test/CodeGenCXX/new.cpp
@@ -45,3 +45,8 @@ void t5() {
// RUN: grep "call void @_ZN2T2C1Eii" %t | count 1
T2 *t2 = new T2(10, 10);
}
+
+int *t6() {
+ // Null check.
+ return new (0) int(10);
+}
OpenPOWER on IntegriCloud