[PCH] Fix assertion hit related to enum decls inside templated funtions.
Report and suggested fix by Tom Honermann! http://llvm.org/bugs/show_bug.cgi?id=13020 llvm-svn: 177330
This commit is contained in:
parent
7ee730414d
commit
ca370b0d1f
|
@ -253,6 +253,7 @@ void ASTDeclWriter::VisitEnumDecl(EnumDecl *D) {
|
||||||
!D->isModulePrivate() &&
|
!D->isModulePrivate() &&
|
||||||
!CXXRecordDecl::classofKind(D->getKind()) &&
|
!CXXRecordDecl::classofKind(D->getKind()) &&
|
||||||
!D->getIntegerTypeSourceInfo() &&
|
!D->getIntegerTypeSourceInfo() &&
|
||||||
|
!D->getMemberSpecializationInfo() &&
|
||||||
D->getDeclName().getNameKind() == DeclarationName::Identifier)
|
D->getDeclName().getNameKind() == DeclarationName::Identifier)
|
||||||
AbbrevToUse = Writer.getDeclEnumAbbrev();
|
AbbrevToUse = Writer.getDeclEnumAbbrev();
|
||||||
|
|
||||||
|
|
|
@ -246,3 +246,16 @@ struct __mt_alloc {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace PR13020 {
|
||||||
|
template<typename T>
|
||||||
|
void f() {
|
||||||
|
enum E {
|
||||||
|
enumerator
|
||||||
|
};
|
||||||
|
|
||||||
|
T t = enumerator;
|
||||||
|
}
|
||||||
|
|
||||||
|
template void f<int>();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue