Implement basic support for friend types and functions in non-dependent
contexts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98321 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclFriend.cpp b/lib/AST/DeclFriend.cpp
index 8c7cadf..ab3552d 100644
--- a/lib/AST/DeclFriend.cpp
+++ b/lib/AST/DeclFriend.cpp
@@ -35,5 +35,7 @@
}
#endif
- return new (C) FriendDecl(DC, L, Friend, FriendL);
+ FriendDecl *FD = new (C) FriendDecl(DC, L, Friend, FriendL);
+ cast<CXXRecordDecl>(DC)->pushFriendDecl(FD);
+ return FD;
}