summaryrefslogtreecommitdiffstats
path: root/lib/StaticAnalyzer
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2017-06-22 10:09:40 +0000
committerGabor Horvath <xazax.hun@gmail.com>2017-06-22 10:09:40 +0000
commit02f895ab3e0581ebf29c5b86b774911746a34570 (patch)
tree742c4d5f2c2eb9f84cd00767d2defecd108238a8 /lib/StaticAnalyzer
parent85856463603bb3be56436220b5a273d200584238 (diff)
[analyzer] Do not continue to analyze a path if the constraints contradict with builtin assume
Differential Revision: https://reviews.llvm.org/D34502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305991 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer')
-rw-r--r--lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp b/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
index 48d6cd8a52..097d419880 100644
--- a/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
@@ -50,8 +50,10 @@ bool BuiltinFunctionChecker::evalCall(const CallExpr *CE,
state = state->assume(ArgSVal.castAs<DefinedOrUnknownSVal>(), true);
// FIXME: do we want to warn here? Not right now. The most reports might
// come from infeasible paths, thus being false positives.
- if (!state)
+ if (!state) {
+ C.generateSink(C.getState(), C.getPredecessor());
return true;
+ }
C.addTransition(state);
return true;