I want to find a declaration of a struct that’s declared in the body of a FunctionDecl. The code looks like this:
DeclarationName struct_name(&m_ast_context->Idents.get(m_struct_name.c_str()));
FunctionDecl::lookup_result struct_lookup = F->lookup(struct_name);
When I call lookup() here, LookupPtr.getPointer() for the FunctionDecl is NULL and LookupPtr.getInt() is also NULL, so lookup() returns lookup_result(lookup_iterator(0), lookup_iterator(0)) without regard to what name I pass in.
Is there something wrong with this FunctionDecl, or is this expected behavior for FunctionDecls?
Sean