diff options
author | John McCall <rjmccall@apple.com> | 2009-08-11 06:59:38 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-08-11 06:59:38 +0000 |
commit | d1e9d835f30a4505c280504bad9f59d68cbd7a50 (patch) | |
tree | b7b4a0abc67d79844bd531dde8844b7040d7949a /clang/lib/AST/DeclCXX.cpp | |
parent | 4d4a2e09a94968ba45dfeb6c294e7b339b81427f (diff) | |
download | bcm5719-llvm-d1e9d835f30a4505c280504bad9f59d68cbd7a50.tar.gz bcm5719-llvm-d1e9d835f30a4505c280504bad9f59d68cbd7a50.zip |
Argument-dependent lookup for friend declarations. Add a new decl type,
FriendFunctionDecl, and create instances as appropriate.
The design of FriendFunctionDecl is still somewhat up in the air; you can
befriend arbitrary types of functions --- methods, constructors, etc. ---
and it's not clear that this representation captures that very well.
We'll have a better picture when we start consuming this data in access
control.
llvm-svn: 78653
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index a302fd87f44..f85091e4f56 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -738,6 +738,15 @@ bool OverloadIterator::Equals(const OverloadIterator &Other) const { return !isa<OverloadedFunctionDecl>(D) || Iter == Other.Iter; } +FriendFunctionDecl *FriendFunctionDecl::Create(ASTContext &C,DeclContext *DC, + SourceLocation L, + DeclarationName N, QualType T, + bool isInline, + SourceLocation FriendL) { + return new (C) FriendFunctionDecl(DC, L, N, T, isInline, FriendL); +} + + LinkageSpecDecl *LinkageSpecDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, |