diff options
Diffstat (limited to 'include/clang/AST/DeclFriend.h')
-rw-r--r-- | include/clang/AST/DeclFriend.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/clang/AST/DeclFriend.h b/include/clang/AST/DeclFriend.h index ba1eb8d..9a64f08 100644 --- a/include/clang/AST/DeclFriend.h +++ b/include/clang/AST/DeclFriend.h @@ -71,10 +71,12 @@ private: : Decl(Decl::Friend, Empty), NextFriend() { } FriendDecl *getNextFriend() { - return cast_or_null<FriendDecl>( - NextFriend.get(getASTContext().getExternalSource())); + if (!NextFriend.isOffset()) + return cast_or_null<FriendDecl>(NextFriend.get(0)); + return getNextFriendSlowCase(); } - + FriendDecl *getNextFriendSlowCase(); + public: static FriendDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, FriendUnion Friend_, |