<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">hi<div><br></div><div>another fairly basic question that i am having trouble with: i am trying to set some state in an analyzer checker in checkBranchCondition and then retrieve it in checkPreCall. the state is being set ok, but for some reason is never readable in successive checkPreCall callbacks, the state map always returns NULL. i thought that the ProgramState data map was supposed to propagate down the graph, is this not how it works? i can see the node that is added to the graph, so why can i not get the state that is set?</div><div><br></div><div>here is the code i am using, i followed some of the other checkers pretty closely, am i doing something stupid here?</div><div><br></div><div><div style="margin: 0px; font-size: 14px; font-family: Monaco; "><span style="color: #bb2ca2">void</span> UnavailableMethodChecker::checkBranchCondition(<span style="color: #bb2ca2">const</span> Stmt *Condition, CheckerContext &Ctx) <span style="color: #bb2ca2">const</span></div><div style="margin: 0px; font-size: 14px; font-family: Monaco; ">{</div><div style="margin: 0px; font-size: 14px; font-family: Monaco; ">    VersionTuple V = getAvailabilityForStmt(Condition, Ctx);</div><div style="margin: 0px; font-size: 14px; font-family: Monaco; ">    ProgramStateRef State = Ctx.getState();</div><div style="margin: 0px; font-size: 14px; font-family: Monaco; ">    SymbolRef Sym = State->getSVal(Condition, Ctx.getLocationContext()).getAsSymbol();</div><div style="margin: 0px; font-size: 14px; font-family: Monaco; ">    State = State->set<AvailabilityMap>(Sym, AvailabilityState(V));</div><div style="margin: 0px; font-size: 14px; font-family: Monaco; ">    Ctx.addTransition(State);</div><div style="margin: 0px; font-size: 14px; font-family: Monaco; ">}</div></div><div style="margin: 0px; font-size: 14px; font-family: Monaco; "><br></div><div style="margin: 0px; font-size: 14px; font-family: Monaco; "><div style="margin: 0px; "><span style="color: #bb2ca2">void</span> UnavailableMethodChecker::checkPreCall(<span style="color: #bb2ca2">const</span> CallEvent &Call, CheckerContext &Ctx) <span style="color: #bb2ca2">const</span></div><div style="margin: 0px; ">{</div><div style="margin: 0px; ">    ...</div><div style="margin: 0px; "><br></div><div style="margin: 0px; ">    ProgramStateRef State = Ctx.getState();</div><div style="margin: 0px; ">    AvailabilityMapTy M = State->get<AvailabilityMap>();</div><div style="margin: 0px; ">    // M is always NULL here</div><div style="margin: 0px; "><br></div><div style="margin: 0px; ">    <span style="color: #bb2ca2">for</span> (AvailabilityMapTy::iterator I = M.begin(), E = M.end(); I != E; ++I) {</div><div style="margin: 0px; ">        AvailabilityState A = I->second;</div><div style="margin: 0px; ">        <span style="color: #bb2ca2">if</span> (A.Version >= CallVersion) {</div><div style="margin: 0px; ">            <span style="color: #bb2ca2">return</span>;</div><div style="margin: 0px; ">        }</div><div style="margin: 0px; ">    }</div><div style="margin: 0px; "><br></div><div style="margin: 0px; ">    ...</div><div style="margin: 0px; ">}</div></div><div style="margin: 0px; font-size: 14px; font-family: Monaco; "><br></div><div style="margin: 0px; font-size: 14px; font-family: Monaco; "><div style="font-family: Helvetica; font-size: medium; ">thanks for the help.</div></div></body></html>