diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-06-16 05:52:03 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-06-16 05:52:03 +0000 |
commit | 7015485d27fb1101b32915768171cf8a5b01b59c (patch) | |
tree | 213b823c4b6480e20832ba90624097aed99e7027 | |
parent | 5126c60498a78b90bda699ba6a2afbb7043686f5 (diff) |
Cast earlier. We know we can get a DefinedSVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106084 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Checker/StreamChecker.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Checker/StreamChecker.cpp b/lib/Checker/StreamChecker.cpp index 80c29a131e..3061883706 100644 --- a/lib/Checker/StreamChecker.cpp +++ b/lib/Checker/StreamChecker.cpp @@ -80,15 +80,15 @@ void StreamChecker::FOpen(CheckerContext &C, const CallExpr *CE) { const GRState *state = C.getState(); unsigned Count = C.getNodeBuilder().getCurrentBlockCount(); ValueManager &ValMgr = C.getValueManager(); - SVal RetVal = ValMgr.getConjuredSymbolVal(0, CE, Count); + DefinedSVal RetVal = cast<DefinedSVal>(ValMgr.getConjuredSymbolVal(0, CE, + Count)); state = state->BindExpr(CE, RetVal); ConstraintManager &CM = C.getConstraintManager(); // Bifurcate the state into two: one with a valid FILE* pointer, the other // with a NULL. const GRState *stateNotNull, *stateNull; - llvm::tie(stateNotNull, stateNull) - = CM.AssumeDual(state, cast<DefinedSVal>(RetVal)); + llvm::tie(stateNotNull, stateNull) = CM.AssumeDual(state, RetVal); C.addTransition(stateNotNull); C.addTransition(stateNull); |