]> granicus.if.org Git - clang/commit
Issue a warning if a throwing operator new or operator new[] returns a null
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 17 Jan 2014 02:09:33 +0000 (02:09 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 17 Jan 2014 02:09:33 +0000 (02:09 +0000)
commitd5695297241d71a4aa38b32562a9d465027b007b
tree4f220772b7ab2a26eedbb258ba2912fd00ff0797
parentb97b819a739269d2a94a9fe08aeba2d782b188d2
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199452 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Type.h
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/Type.cpp
lib/Sema/SemaStmt.cpp
test/SemaCXX/new-delete.cpp
test/SemaCXX/new-null.cpp [new file with mode: 0644]
test/SemaCXX/warn-new-overaligned.cpp