зеркало из https://github.com/microsoft/clang-1.git
Canonicalize the declaration we write to a PCH file for an
InjectedClassNameType; otherwise, it won't be properly wired to the original (canonical) declaration when it is deserialized. Fixes <rdar://problem/11112464>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153442 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
dccb9bb102
Коммит
a8e0b978d6
|
@ -365,7 +365,7 @@ void ASTTypeWriter::VisitElaboratedType(const ElaboratedType *T) {
|
|||
}
|
||||
|
||||
void ASTTypeWriter::VisitInjectedClassNameType(const InjectedClassNameType *T) {
|
||||
Writer.AddDeclRef(T->getDecl(), Record);
|
||||
Writer.AddDeclRef(T->getDecl()->getCanonicalDecl(), Record);
|
||||
Writer.AddTypeRef(T->getInjectedSpecializationType(), Record);
|
||||
Code = TYPE_INJECTED_CLASS_NAME;
|
||||
}
|
||||
|
|
|
@ -62,3 +62,9 @@ namespace Test1 {
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
template< typename D >
|
||||
Foo< D >& Foo< D >::operator=( const Foo& other )
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
|
|
@ -205,3 +205,13 @@ namespace NonTypeTemplateParmContext {
|
|||
template<int inlineCapacity>
|
||||
inline bool equalIgnoringNullity(const Vector<char, inlineCapacity>& a, const String& b) { return false; }
|
||||
}
|
||||
|
||||
// <rdar://problem/11112464>
|
||||
template< typename > class Foo;
|
||||
|
||||
template< typename T >
|
||||
class Foo : protected T
|
||||
{
|
||||
public:
|
||||
Foo& operator=( const Foo& other );
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче