forked from OSchip/llvm-project
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. llvm-svn: 354173
This commit is contained in:
parent
a2d9fdf5b6
commit
35b007e9a9
|
@ -1654,6 +1654,7 @@ ClassTemplateDecl *ClangASTContext::CreateClassTemplateDecl(
|
||||||
decl_ctx, // What decl context do we use here? TU? The actual decl
|
decl_ctx, // What decl context do we use here? TU? The actual decl
|
||||||
// context?
|
// context?
|
||||||
SourceLocation(), decl_name, template_param_list, template_cxx_decl);
|
SourceLocation(), decl_name, template_param_list, template_cxx_decl);
|
||||||
|
template_cxx_decl->setDescribedClassTemplate(class_template_decl);
|
||||||
|
|
||||||
if (class_template_decl) {
|
if (class_template_decl) {
|
||||||
if (access_type != eAccessNone)
|
if (access_type != eAccessNone)
|
||||||
|
|
Loading…
Reference in New Issue