<div dir="ltr">Hello All,<div><br></div><div>I am trying to find the clang::FunctionDecl relevant to a return expression (clang::Expr). For example consider following function;</div><div><br></div><div>1. int foo(int a, int b) {</div><div>2. </div><div>3.  int k;</div><div>4.  int d = 5 * k;</div><div>5. </div><div>6.  return d;</div><div>7. </div><div>8. }</div><div><br></div><div><br></div><div>I have an expression (clang::Expr type) relevant to line 6 (return statement). From that I want to access the function declaration (clang::FunctionDecl) where return statement resides (i.e. foo).</div><div><br></div><div>Further I need to access declarations relevant to lines 3 and 4. I believe I can access name declarations relevant to lines 3 and 4 once I have access to FunctionDecl.</div><div><br></div><div>Could you please advise how to access clang::FunctionDecl from clang::Expr ?</div><div><br></div><div>Thank you in advance.</div><div><br></div><div>Regards</div><div>-Thejaka</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>