[all-commits] [llvm/llvm-project] 42b99e: [Clang] Check for returns_nonnull when deciding to...
modiking via All-commits
all-commits at lists.llvm.org
Wed Jun 23 17:15:48 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 42b99e094c4f57b52807c56641c0a545b4a9a600
https://github.com/llvm/llvm-project/commit/42b99e094c4f57b52807c56641c0a545b4a9a600
Author: modimo <modimo at fb.com>
Date: 2021-06-23 (Wed, 23 Jun 2021)
Changed paths:
M clang/lib/AST/ExprCXX.cpp
M clang/test/CodeGenCXX/new.cpp
Log Message:
-----------
[Clang] Check for returns_nonnull when deciding to add allocation null checks
Non-throwing allocators currently will always get null-check code. However, if the non-throwing allocator is explicitly annotated with returns_nonnull the null check should be elided.
Testing:
ninja check-all
added test case correctly elides
Reviewed By: bruno
Differential Revision: https://reviews.llvm.org/D102820
More information about the All-commits
mailing list