summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-03-14 16:48:29 +0000
committerVedant Kumar <vsk@apple.com>2017-03-14 16:48:29 +0000
commit2b9f48afdd67dcfdd37d7afe6a34059cd390fc21 (patch)
treec80609bb8a097226adecbe0ed69c393442af1a04 /clang/lib/CodeGen/CodeGenFunction.h
parentc5d628400ff7e42a0b83e8e126b89ba45c1469e2 (diff)
downloadbcm5719-llvm-2b9f48afdd67dcfdd37d7afe6a34059cd390fc21.tar.gz
bcm5719-llvm-2b9f48afdd67dcfdd37d7afe6a34059cd390fc21.zip
[ubsan] Use the nicer nullability diagnostic handlers
This is a follow-up to r297700 (Add a nullability sanitizer). It addresses some FIXME's re: using nullability-specific diagnostic handlers from compiler-rt, now that the necessary handlers exist. check-ubsan test updates to follow. llvm-svn: 297750
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 2db8a18ceff..7e99bdb73c4 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -115,6 +115,8 @@ enum TypeEvaluationKind {
SANITIZER_CHECK(MissingReturn, missing_return, 0) \
SANITIZER_CHECK(MulOverflow, mul_overflow, 0) \
SANITIZER_CHECK(NegateOverflow, negate_overflow, 0) \
+ SANITIZER_CHECK(NullabilityArg, nullability_arg, 0) \
+ SANITIZER_CHECK(NullabilityReturn, nullability_return, 0) \
SANITIZER_CHECK(NonnullArg, nonnull_arg, 0) \
SANITIZER_CHECK(NonnullReturn, nonnull_return, 0) \
SANITIZER_CHECK(OutOfBounds, out_of_bounds, 0) \
@@ -2290,7 +2292,9 @@ public:
TCK_Upcast,
/// Checking the operand of a cast to a virtual base object. Must be an
/// object within its lifetime.
- TCK_UpcastToVirtualBase
+ TCK_UpcastToVirtualBase,
+ /// Checking the value assigned to a _Nonnull pointer. Must not be null.
+ TCK_NonnullAssign
};
/// \brief Whether any type-checking sanitizers are enabled. If \c false,
OpenPOWER on IntegriCloud