diff options
author | Enea Zaffanella <zaffanella@cs.unipr.it> | 2013-01-31 09:54:08 +0000 |
---|---|---|
committer | Enea Zaffanella <zaffanella@cs.unipr.it> | 2013-01-31 09:54:08 +0000 |
commit | eb22c870aca64819ec919607c6328b8ded2480c0 (patch) | |
tree | a78d4cb0d2f2379f5520cd60afa501be603167bd /clang/lib/Serialization/ASTReaderDecl.cpp | |
parent | 102846714a88538554c7ff69773140152e6135e9 (diff) | |
download | bcm5719-llvm-eb22c870aca64819ec919607c6328b8ded2480c0.tar.gz bcm5719-llvm-eb22c870aca64819ec919607c6328b8ded2480c0.zip |
Added outer template parameter lists to friend type AST nodes.
llvm-svn: 174050
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index 5fe1011579a..469b3938ee5 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1262,10 +1262,12 @@ void ASTDeclReader::VisitAccessSpecDecl(AccessSpecDecl *D) { void ASTDeclReader::VisitFriendDecl(FriendDecl *D) { VisitDecl(D); - if (Record[Idx++]) - D->Friend = GetTypeSourceInfo(Record, Idx); - else + if (Record[Idx++]) // hasFriendDecl D->Friend = ReadDeclAs<NamedDecl>(Record, Idx); + else + D->Friend = GetTypeSourceInfo(Record, Idx); + for (unsigned i = 0; i != D->NumTPLists; ++i) + D->getTPLists()[i] = Reader.ReadTemplateParameterList(F, Record, Idx); D->NextFriend = Record[Idx++]; D->UnsupportedFriend = (Record[Idx++] != 0); D->FriendLoc = ReadSourceLocation(Record, Idx); @@ -2003,7 +2005,7 @@ Decl *ASTReader::ReadDeclRecord(DeclID ID) { D = AccessSpecDecl::CreateDeserialized(Context, ID); break; case DECL_FRIEND: - D = FriendDecl::CreateDeserialized(Context, ID); + D = FriendDecl::CreateDeserialized(Context, ID, Record[Idx++]); break; case DECL_FRIEND_TEMPLATE: D = FriendTemplateDecl::CreateDeserialized(Context, ID); |