summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTReaderDecl.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index 92b387e21ac..5b4a64eeb5c 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -93,6 +93,7 @@ namespace clang {
void VisitNamespaceAliasDecl(NamespaceAliasDecl *D);
void VisitTypeDecl(TypeDecl *TD);
void VisitTypedefDecl(TypedefDecl *TD);
+ void VisitTypeAliasDecl(TypeAliasDecl *TD);
void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D);
void VisitTagDecl(TagDecl *TD);
void VisitEnumDecl(EnumDecl *ED);
@@ -240,6 +241,11 @@ void ASTDeclReader::VisitTypedefDecl(TypedefDecl *TD) {
TD->setTypeSourceInfo(GetTypeSourceInfo(Record, Idx));
}
+void ASTDeclReader::VisitTypeAliasDecl(TypeAliasDecl *TD) {
+ VisitTypeDecl(TD);
+ TD->setTypeSourceInfo(GetTypeSourceInfo(Record, Idx));
+}
+
void ASTDeclReader::VisitTagDecl(TagDecl *TD) {
VisitTypeDecl(TD);
VisitRedeclarable(TD);
@@ -251,10 +257,10 @@ void ASTDeclReader::VisitTagDecl(TagDecl *TD) {
if (Record[Idx++]) { // hasExtInfo
TagDecl::ExtInfo *Info = new (*Reader.getContext()) TagDecl::ExtInfo();
ReadQualifierInfo(*Info, Record, Idx);
- TD->TypedefDeclOrQualifier = Info;
+ TD->TypedefNameDeclOrQualifier = Info;
} else
- TD->setTypedefForAnonDecl(
- cast_or_null<TypedefDecl>(Reader.GetDecl(Record[Idx++])));
+ TD->setTypedefNameForAnonDecl(
+ cast_or_null<TypedefNameDecl>(Reader.GetDecl(Record[Idx++])));
}
void ASTDeclReader::VisitEnumDecl(EnumDecl *ED) {
@@ -1429,6 +1435,10 @@ Decl *ASTReader::ReadDeclRecord(unsigned Index, DeclID ID) {
D = TypedefDecl::Create(*Context, 0, SourceLocation(), SourceLocation(),
0, 0);
break;
+ case DECL_TYPEALIAS:
+ D = TypeAliasDecl::Create(*Context, 0, SourceLocation(), SourceLocation(),
+ 0, 0);
+ break;
case DECL_ENUM:
D = EnumDecl::Create(*Context, Decl::EmptyShell());
break;
OpenPOWER on IntegriCloud