Author: rsmith Date: Fri Feb 15 13:48:09 2019 New Revision: 354173 URL: http://llvm.org/viewvc/llvm-project?rev=354173&view=rev Log: Fix AST generated for a class template to connect the class inside a class template back to the template.
Previously, when the ASTImporter imported the class, it didn't know that it was the pattern of a class template, so made the class a name lookup result for the name of the template, resulting in ambiguity errors when naming the template. Due to a clang bug (fixed in r354091, reverted and soon to be re-committed), ambiguity errors between a template and a non-template were previously not diagnosed. Once r354091 is re-committed, this will be covered by existing lldb tests. Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=354173&r1=354172&r2=354173&view=diff ============================================================================== --- lldb/trunk/source/Symbol/ClangASTContext.cpp (original) +++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Feb 15 13:48:09 2019 @@ -1654,6 +1654,7 @@ ClassTemplateDecl *ClangASTContext::Crea decl_ctx, // What decl context do we use here? TU? The actual decl // context? SourceLocation(), decl_name, template_param_list, template_cxx_decl); + template_cxx_decl->setDescribedClassTemplate(class_template_decl); if (class_template_decl) { if (access_type != eAccessNone) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits