
This patch reapplies #114258, fixing an infinite recursion bug in `ASTImporter` that occurs when importing the primary template of a class template specialization when the latest redeclaration of that template is a friend declaration in the primary template.
48 lines
684 B
C++
48 lines
684 B
C++
namespace N0 {
|
|
template<typename T>
|
|
struct A {
|
|
template<typename U>
|
|
friend struct A;
|
|
};
|
|
|
|
template struct A<long>;
|
|
} // namespace N0
|
|
|
|
namespace N1 {
|
|
template<typename T>
|
|
struct A;
|
|
|
|
template<typename T>
|
|
struct A {
|
|
template<typename U>
|
|
friend struct A;
|
|
};
|
|
|
|
template struct A<long>;
|
|
} // namespace N1
|
|
|
|
namespace N2 {
|
|
template<typename T>
|
|
struct A {
|
|
template<typename U>
|
|
friend struct A;
|
|
};
|
|
|
|
template<typename T>
|
|
struct A;
|
|
|
|
template struct A<long>;
|
|
} // namespace N2
|
|
|
|
namespace N3 {
|
|
struct A {
|
|
template<typename T>
|
|
friend struct B;
|
|
};
|
|
|
|
template<typename T>
|
|
struct B { };
|
|
|
|
template struct B<long>;
|
|
} // namespace N3
|