From 554bcb69c2d785a011a30e7db87a36a87fe7db10 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 15 Aug 2012 20:02:54 +0000 Subject: Vendor import of clang trunk r161861: http://llvm.org/svn/llvm-project/cfe/trunk@161861 --- include/clang/AST/DeclFriend.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/clang/AST/DeclFriend.h') 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( - NextFriend.get(getASTContext().getExternalSource())); + if (!NextFriend.isOffset()) + return cast_or_null(NextFriend.get(0)); + return getNextFriendSlowCase(); } - + FriendDecl *getNextFriendSlowCase(); + public: static FriendDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, FriendUnion Friend_, -- cgit v1.1