diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -1563,15 +1563,7 @@ ast.getTypeDeclType(class_template_specialization_decl, nullptr); class_template_specialization_decl->setDeclName( class_template_decl->getDeclName()); - // FIXME: Turning this on breaks the libcxx data formatter tests. - // SetOwningModule marks the Decl as external, which prevents a - // LookupPtr from being built. Template instantiations can also not - // be found by ExternalASTSource::FindExternalVisibleDeclsByName(), - // nor can we lazily build a LookupPtr later, because template - // specializations are supposed to be hidden so - // makeDeclVisibleInContextWithFlags() is a noop, as well. - // - // SetOwningModule(class_template_specialization_decl, owning_module); + SetOwningModule(class_template_specialization_decl, owning_module); decl_ctx->addDecl(class_template_specialization_decl); class_template_specialization_decl->setSpecializationKind( diff --git a/lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm b/lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm --- a/lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm +++ b/lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm @@ -52,10 +52,10 @@ // Template specializations are not yet supported, so they lack the ownership info: Template t2; -// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} struct Template +// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} imported in A struct Template Namespace::InNamespace t3; -// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} struct InNamespace +// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} imported in A struct InNamespace Namespace::AlsoInNamespace t4; -// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} struct AlsoInNamespace +// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} imported in A.B struct AlsoInNamespace