mergeRedeclarable(D, Redecl);
+ // If we merged the template with a prior declaration chain, merge the common
+ // pointer.
+ // FIXME: Actually merge here, don't just overwrite.
+ D->Common = D->getCanonicalDecl()->Common;
+
return Redecl;
}
SomeTemplate<char[1]> b, c;
b = c;
}
+
+template<int> struct MergeTemplates;
+MergeTemplates<0> *merge_templates_a;
extern DefinedInCommon &defined_in_common;
+template<int> struct MergeTemplates;
+MergeTemplates<0> *merge_templates_b;
+
@import cxx_templates_b_impl;
template<typename T, typename> struct Identity { typedef T type; };
// expected-error@Inputs/cxx-templates-a.h:19 {{definition of 'DefinedInBImpl' must be imported}}
// expected-note@Inputs/cxx-templates-b-impl.h:1 {{definition is here}}
PerformDelayedLookup(defined_in_b_impl); // expected-note {{in instantiation of}}
+
+ merge_templates_a = merge_templates_b; // ok, same type
}
RedeclaredAsFriend<int> raf1;