diff options
author | Vedant Kumar <vsk@apple.com> | 2017-03-06 05:28:22 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-03-06 05:28:22 +0000 |
commit | ed00ea084e4013b2e6f6dc3c0fa7d8a20cbdc9a0 (patch) | |
tree | 1646a75997e873cccc4780edb9d64144669f85f5 /clang/lib/CodeGen/CGExprCXX.cpp | |
parent | 88772e2e4b3760b6ff54603fc3fd644b901d472d (diff) | |
download | bcm5719-llvm-ed00ea084e4013b2e6f6dc3c0fa7d8a20cbdc9a0.tar.gz bcm5719-llvm-ed00ea084e4013b2e6f6dc3c0fa7d8a20cbdc9a0.zip |
[ubsan] Extend the nonnull arg check to ObjC
UBSan's nonnull argument check applies when a parameter has the
"nonnull" attribute. The check currently works for FunctionDecls, but
not for ObjCMethodDecls. This patch extends the check to work for ObjC.
Differential Revision: https://reviews.llvm.org/D30599
llvm-svn: 296996
Diffstat (limited to 'clang/lib/CodeGen/CGExprCXX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index e597f469052..04826916f73 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -1579,7 +1579,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) { // FIXME: Why do we not pass a CalleeDecl here? EmitCallArgs(allocatorArgs, allocatorType, E->placement_arguments(), - /*CalleeDecl*/nullptr, /*ParamsToSkip*/ParamsToSkip); + /*AC*/AbstractCallee(), /*ParamsToSkip*/ParamsToSkip); RValue RV = EmitNewDeleteCall(*this, allocator, allocatorType, allocatorArgs); |