<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>    Hello, everyone.</div><div>    I'm writing a checker for clang static analyzer.My test program is as follows:</div><div><div><span style="line-height: 1.7;">int f()</span></div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>struct list l;</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>if (l.size() == 0)</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">            </span>//printf("equals zero\n");</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div>}</div></div><div><br></div><div>its ast nodes is :</div><div><div>`-FunctionDecl 0x3b4bad0 <line:25:1, line:32:1> f 'int (void)'</div><div>  `-CompoundStmt 0x3b4bf48 <line:26:1, line:32:1></div><div>    |-DeclStmt 0x3b4be20 <line:27:2, col:15></div><div>    | `-VarDecl 0x3b4bbc0 <col:2, col:14> l 'struct list':'struct <anonymous>::list'</div><div>    |   `-CXXConstructExpr 0x3b4bdf0 <col:14> 'struct list':'struct <anonymous>::list' 'void (void)'</div><div>    `-IfStmt 0x3b4bf18 <line:28:2, line:31:2></div><div>      |-<<<NULL>>></div><div>      |-BinaryOperator 0x3b4bed8 <line:28:6, col:18> '_Bool' '=='</div><div>      | |-CXXMemberCallExpr 0x3b4be90 <col:6, col:13> 'int'</div><div>      | | `-MemberExpr 0x3b4be60 <col:6, col:8> '<bound member function type>' .size 0x3b4b930</div><div>      | |   `-DeclRefExpr 0x3b4be38 <col:6> 'struct list':'struct <anonymous>::list' lvalue Var 0x3b4bbc0 'l' 'struct list':'struct <anonymous>::list'</div><div>      | `-IntegerLiteral 0x3b4beb8 <col:18> 'int' 0</div><div>      |-CompoundStmt 0x3b4bf00 <line:29:2, line:31:2></div><div>      `-<<<NULL>>></div></div><div><br></div><div>now I have got the BinaryOperator object, but how could I get the Decl object that represents the function f ?</div><div>i.e how could I get the <span style="line-height: 19.0399990081787px;">FunctionDecl object ?</span></div><div><span style="line-height: 19.0399990081787px;"><br></span></div><div><span style="line-height: 19.0399990081787px;">Thanks for any suggestion.</span></div><div>                    </div><div><span style="line-height: 19.0399990081787px;"><br></span></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>