<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I want to find a declaration of a struct that's declared in the body of a FunctionDecl.  The code looks like this:<div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">DeclarationName struct_name(&m_ast_context->Idents.get(m_struct_name.c_str()));</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">FunctionDecl::lookup_result struct_lookup = F->lookup(struct_name);</div><div><br></div></div><div>When I call <span style="font-family: Menlo; font-size: 11px; ">lookup()</span> here, <span style="font-family: Menlo; font-size: 11px; ">LookupPtr.getPointer()</span> for the FunctionDecl is NULL and <span style="font-family: Menlo; font-size: 11px; ">LookupPtr.getInt()</span> is also NULL, so <span style="font-family: Menlo; font-size: 11px; ">lookup()</span> returns <span style="font-family: Menlo; font-size: 11px; ">lookup_result(lookup_iterator(</span><span style="font-family: Menlo; font-size: 11px; ">0</span><span style="font-family: Menlo; font-size: 11px; ">), lookup_iterator(</span><span style="font-family: Menlo; font-size: 11px; ">0</span><span style="font-family: Menlo; font-size: 11px; ">))</span> without regard to what name I pass in.</div><div><br></div><div>Is there something wrong with this FunctionDecl, or is this expected behavior for FunctionDecls?</div><div><br></div><div>Sean</div></body></html>