<div dir="ltr">Hello,<div><br></div><div>I have got the CFG and I am analysing the CFGBlock of it.</div><div><br></div><div>I notice that in Clang, a for loop will be divide into several basic blocks like :</div><div><br></div>
<div> </div><div> for (int a = 0, int i = 0; i< 5; i++)</div><div> a++; </div><div><br></div><div>Then we can got:</div><div> B1: int a=0, int i =0;</div><div> B2: i < 5;</div>
<div> B3: i ++;</div><div> B4: a++;</div><div><br></div><div>and so on by using clang -cc1 -analyze -analyzer-checker=debug.DumpCFG xxx.c</div>
<div><br></div><div>My question is , when a got the first CFGElement of CFGBlock by using </div><div>CFGBlock.front();</div><div>How can I know this CFGElement is in the for loop?</div><div>(Which means my current analyzing block is B2 or B3 )</div>
<div><br></div><div>Thanks,</div><div>Shuai </div><div><br></div></div>