[Lldb-commits] [PATCH] D12897: Add using directives to the clang::DeclContext and fix decls for variables inside namespaces

Paul Herman via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 16 10:34:38 PDT 2015

paulherman added a comment.

The need for ParseDeclsInContext is to get a list of namespaces that are contained within a using-directive. This does not actually parse anything but DW_TAG_imported_namespace and DW_TAG_imported_decl. The actual contents of the namespace are parsed only when the search reaches it.

About having the using-directives in the source that is passed to clang, I don't think that will work since there is a comment in ClangASTSource::FindExternalDeclsByName:

  // Using directives found in this context.
  // Tell Sema we didn't find any or we'll end up getting asked a *lot*.
  case DeclarationName::CXXUsingDirective:
    SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name);
    return false;


More information about the lldb-commits mailing list