diff options
author | John McCall <rjmccall@apple.com> | 2009-08-28 07:59:38 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-08-28 07:59:38 +0000 |
commit | 02cace78cf48cc26686bd5b07c78606abca13bcd (patch) | |
tree | 6a631652ec93156bd9ed8b2eafd457d8948a607a /lib/AST/DeclBase.cpp | |
parent | 550b14b410eaed037c9b791806194e6cea1ebe90 (diff) |
Omnibus friend decl refactoring. Instead of cloning AST classes for friend
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not. Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.
Refactor the Sema methods specific to friends for cleaner flow and less nesting.
Incidentally solve a few bugs, but I remain confident that we can put them back.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 28d543785f..3ced0eff4c 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -200,10 +200,6 @@ unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) { case ObjCCompatibleAlias: return IDNS_Ordinary; - case FriendClass: - case FriendFunction: - return IDNS_Friend; - case ObjCProtocol: return IDNS_ObjCProtocol; @@ -233,6 +229,7 @@ unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) { return IDNS_Tag | IDNS_Ordinary; // Never have names. + case Friend: case LinkageSpec: case FileScopeAsm: case StaticAssert: |