[cfe-commits] r106084 - /cfe/trunk/lib/Checker/StreamChecker.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Tue Jun 15 22:52:03 PDT 2010
Author: zhongxingxu
Date: Wed Jun 16 00:52:03 2010
New Revision: 106084
URL: http://llvm.org/viewvc/llvm-project?rev=106084&view=rev
Log:
Cast earlier. We know we can get a DefinedSVal.
Modified:
cfe/trunk/lib/Checker/StreamChecker.cpp
Modified: cfe/trunk/lib/Checker/StreamChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/StreamChecker.cpp?rev=106084&r1=106083&r2=106084&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/StreamChecker.cpp (original)
+++ cfe/trunk/lib/Checker/StreamChecker.cpp Wed Jun 16 00:52:03 2010
@@ -80,15 +80,15 @@
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);
More information about the cfe-commits
mailing list