diff options
-rw-r--r-- | lib/Serialization/ASTWriterDecl.cpp | 1 | ||||
-rw-r--r-- | test/PCH/cxx-templates.h | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp index 6c63a149c2..d8b5b91108 100644 --- a/lib/Serialization/ASTWriterDecl.cpp +++ b/lib/Serialization/ASTWriterDecl.cpp @@ -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(); diff --git a/test/PCH/cxx-templates.h b/test/PCH/cxx-templates.h index 3dda059026..00631ddbfb 100644 --- a/test/PCH/cxx-templates.h +++ b/test/PCH/cxx-templates.h @@ -246,3 +246,16 @@ struct __mt_alloc { } }; } + +namespace PR13020 { +template<typename T> +void f() { + enum E { + enumerator + }; + + T t = enumerator; +} + +template void f<int>(); +} |