summaryrefslogtreecommitdiffstats
path: root/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp b/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
index 152b937bb0..a98d379bb8 100644
--- a/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
@@ -253,6 +253,12 @@ void DereferenceChecker::checkBind(SVal L, SVal V, const Stmt *S,
if (!TVR->getValueType()->isReferenceType())
return;
+ // FIXME: This is a hotfix for https://llvm.org/bugs/show_bug.cgi?id=31592
+ // A proper fix is very much necessary. Otherwise we would never normally bind
+ // a NonLoc to a reference.
+ if (V.getAs<NonLoc>())
+ return;
+
ProgramStateRef State = C.getState();
ProgramStateRef StNonNull, StNull;