<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hello, </div><div>Thanks in advance for any help!</div><div> </div><div>If I have the following code:</div><div> </div><div>void function()</div><div>{</div><div>       int a = 1;</div><div>       if ( ( a<10 ) && ( a > 20 ) ) // always false</div><div>      {</div><div>      } </div><div>}</div><div> </div><div>How can I evaluate the whole condition expression  '( a<10 ) && ( a > 20 ) ' ?</div><div>When I write code like:</div><div>class MyChecker : public Checker< check::BranchCOndition ></div><div>{   </div><div>public:</div><div>   void checkBranchCondition(const Stmt* cond, CheckerContext& ctx) const;</div><div>}</div><div> </div><div>I found that checkBranchCondition() only be called back 2 times, once for 'a<10' , once for 'a > 20 '.  And it's done. No further call back.</div><div>But my goal is to get the 'value' for the whole  '( a<10 ) && ( a > 20 ) '. </div><div>I tried the following in vain:</div><div> </div><div>1. in checkBranchCondition(), find the 'father' node(it is '( a<10 ) && ( a > 20 ) ' ), and evaluate its 'sval', but the sval is invalid/undifined</div><div>2. Use check::PostStmt<CompoundStmt> call back. It does NOT called back at all</div><div>3. Use check::PostStmt<Stmt> call back, and try to find the 'father' by : if(isa<IfStmt>(stmt)), useless.</div><div>4. Use check::PostStmt<BinaryOperator>, but it still only called back 2 times:  once for 'a<10' , once for 'a > 20 '</div><div> </div><div>I am a fresh man in the static analyzer, please help, thanks!</div><div> </div><div>illiop</div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div></div><br><br><span title="neteasefooter"><p> </p></span>