diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-02-17 23:13:45 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-02-17 23:13:45 +0000 |
commit | 3133f79cf451e6302dd05262b4bb53a3e4fd6300 (patch) | |
tree | 613e236257e18add8ade22ee2805c154bd1b15aa /lib/StaticAnalyzer/Checkers/StreamChecker.cpp | |
parent | d8a8a3b6ad7c786dfcf341b080bd19b5d4b84b5b (diff) |
Have conjured symbols depend on LocationContext, to add context sensitivity for functions called more than once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/StreamChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/StreamChecker.cpp b/lib/StaticAnalyzer/Checkers/StreamChecker.cpp index 54fd70ab37..3745d4ad39 100644 --- a/lib/StaticAnalyzer/Checkers/StreamChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/StreamChecker.cpp @@ -221,8 +221,9 @@ void StreamChecker::OpenFileAux(CheckerContext &C, const CallExpr *CE) const { ProgramStateRef state = C.getState(); unsigned Count = C.getCurrentBlockCount(); SValBuilder &svalBuilder = C.getSValBuilder(); + const LocationContext *LCtx = C.getPredecessor()->getLocationContext(); DefinedSVal RetVal = - cast<DefinedSVal>(svalBuilder.getConjuredSymbolVal(0, CE, Count)); + cast<DefinedSVal>(svalBuilder.getConjuredSymbolVal(0, CE, LCtx, Count)); state = state->BindExpr(CE, C.getLocationContext(), RetVal); ConstraintManager &CM = C.getConstraintManager(); |