mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
[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:
@@ -253,6 +253,7 @@ void ASTDeclWriter::VisitEnumDecl(EnumDecl *D) {
|
||||
!D->isModulePrivate() &&
|
||||
!CXXRecordDecl::classofKind(D->getKind()) &&
|
||||
!D->getIntegerTypeSourceInfo() &&
|
||||
!D->getMemberSpecializationInfo() &&
|
||||
D->getDeclName().getNameKind() == DeclarationName::Identifier)
|
||||
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>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user