summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Checker/AttrNonNullChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Checker/AttrNonNullChecker.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/Checker/AttrNonNullChecker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/llvm/tools/clang/lib/Checker/AttrNonNullChecker.cpp b/contrib/llvm/tools/clang/lib/Checker/AttrNonNullChecker.cpp
index 309a74c..d0bccb2 100644
--- a/contrib/llvm/tools/clang/lib/Checker/AttrNonNullChecker.cpp
+++ b/contrib/llvm/tools/clang/lib/Checker/AttrNonNullChecker.cpp
@@ -60,9 +60,10 @@ void AttrNonNullChecker::PreVisitCallExpr(CheckerContext &C,
if (!Att->isNonNull(idx))
continue;
- const SVal &V = state->getSVal(*I);
- const DefinedSVal *DV = dyn_cast<DefinedSVal>(&V);
+ SVal V = state->getSVal(*I);
+ DefinedSVal *DV = dyn_cast<DefinedSVal>(&V);
+ // If the value is unknown or undefined, we can't perform this check.
if (!DV)
continue;
OpenPOWER on IntegriCloud