aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/DeclFriend.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/DeclFriend.h')
-rw-r--r--include/clang/AST/DeclFriend.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/clang/AST/DeclFriend.h b/include/clang/AST/DeclFriend.h
index 57a54e6507..9a64f08dee 100644
--- a/include/clang/AST/DeclFriend.h
+++ b/include/clang/AST/DeclFriend.h
@@ -15,7 +15,6 @@
#ifndef LLVM_CLANG_AST_DECLFRIEND_H
#define LLVM_CLANG_AST_DECLFRIEND_H
-#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclCXX.h"
#include "llvm/Support/Compiler.h"
@@ -72,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_,