<div dir="ltr">
<p class=""><span class="">Hello,</span></p>
<p class="">I am writing a taint tracking checker of clang static analyzer, and currently I need to do something when a branch is finished being analyzed. Aka I need to know when the symbolic execution reaches the end of an If code block or Else code block. Like the following example:<br><span class=""></span></p>
<p class="">1 if(a >1){<br><span class=""></span></p>
<p class=""><span class="">2 b = a + 1;</span></p>
<p class=""><span class="">3 c = a + 2;</span></p>
<p class=""><span class="">4 }</span></p>
<p class=""><span class="">5 else{</span></p>
<p class=""><span class="">6 b = a + 3;</span></p>
<p class=""><span class="">7 c = a + 4;</span></p>
<p class=""><span class="">8 }</span></p>
<p class=""><span class="">How can I notice that the symbolic execution reaches line 4 and line 8? Can the callbacks in the static analyzer checker do this?</span></p>
<p class=""><span class=""> I have tried the CompoundStmt, but it didn't work in the callback function CheckPostStmt<CompoundStmt>, and neither did the BlockExpr work.</span></p>
<p class=""><span class="">It seems that the control flow stmt can only be analyzed in a path-insensitive way, such as using the ASTDecl and ASTCodeBody callbacks. Can I handle the IfStmt or ForStmt in a path-sensitive way to achieve this goal? Thank you!</span></p><p class=""><span class=""><br></span></p><p class=""><span class=""></span></p>
<p class=""><span class="">Best</span></p>
<p class=""><span class="">Pengfei</span></p></div>