diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2015-05-30 16:11:40 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2015-05-30 16:11:40 +0000 |
commit | 1ba2d78b9a1263e3f70ffa850d7756a8345a760d (patch) | |
tree | b2a05210be360cbc780ce53ada524164732c13fc /clang/lib/CodeGen/CodeGenFunction.h | |
parent | b08cf1cfd2b09774150376807bea9a74918e46e9 (diff) | |
download | llvm-1ba2d78b9a1263e3f70ffa850d7756a8345a760d.zip llvm-1ba2d78b9a1263e3f70ffa850d7756a8345a760d.tar.gz llvm-1ba2d78b9a1263e3f70ffa850d7756a8345a760d.tar.bz2 |
ubsan: Check for null pointers given to certain builtins, such
as memcpy, memset, memmove, and bzero.
Reviewed by: Richard Smith
Differential Revision: http://reviews.llvm.org/D9673
llvm-svn: 238657
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 3b6cdcb..469022d 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2836,6 +2836,11 @@ public: /// conditional branch to it, for the -ftrapv checks. void EmitTrapCheck(llvm::Value *Checked); + /// \brief Create a check for a function parameter that may potentially be + /// declared as non-null. + void EmitNonNullArgCheck(RValue RV, QualType ArgType, SourceLocation ArgLoc, + const FunctionDecl *FD, unsigned ParmNum); + /// EmitCallArg - Emit a single call argument. void EmitCallArg(CallArgList &args, const Expr *E, QualType ArgType); |