summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/new-delete.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-01-17 02:09:33 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-01-17 02:09:33 +0000
commit2c6b449098dc0047f4697b2f822a7c7e56c32f43 (patch)
tree7a5cee6e7fbab5fc1286248d2db7b20040445c54 /clang/test/SemaCXX/new-delete.cpp
parente9d2bfc7e95b89c4ab5715d3036ff7489c5ef233 (diff)
downloadbcm5719-llvm-2c6b449098dc0047f4697b2f822a7c7e56c32f43.tar.gz
bcm5719-llvm-2c6b449098dc0047f4697b2f822a7c7e56c32f43.zip
Issue a warning if a throwing operator new or operator new[] returns a null
pointer, since this invokes undefined behavior. Based on a patch by Artyom Skrobov! Handling of dependent exception specifications and some additional testcases by me. llvm-svn: 199452
Diffstat (limited to 'clang/test/SemaCXX/new-delete.cpp')
-rw-r--r--clang/test/SemaCXX/new-delete.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/new-delete.cpp b/clang/test/SemaCXX/new-delete.cpp
index 7facd10ca5f..59e2574fa14 100644
--- a/clang/test/SemaCXX/new-delete.cpp
+++ b/clang/test/SemaCXX/new-delete.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -triple=i686-pc-linux-gnu
+// RUN: %clang_cc1 -fsyntax-only -verify %s -triple=i686-pc-linux-gnu -Wno-new-returns-null
#include <stddef.h>
OpenPOWER on IntegriCloud