diff options
author | John McCall <rjmccall@apple.com> | 2010-04-13 01:44:10 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-04-13 01:44:10 +0000 |
commit | 9ea6397bf4ff53768ef4bdc0945965103a22e98c (patch) | |
tree | 2a4e9e1ee39139d5da050c7fbf64ca238b114b42 /lib/Sema/SemaDecl.cpp | |
parent | 984152f34b50aa9e00fa809d6e7662442bb8206d (diff) |
Don't try to find a scope corresponding to the search DC for an unfound
friend declaration; this used to be important but is now just a waste of time
plus an unreasonable assertion. Fixes PR6174.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index a4d8651212..171bee66ca 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -4930,14 +4930,6 @@ Sema::DeclPtrTy Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, // class or function, the friend class or function is a member of // the innermost enclosing namespace. SearchDC = SearchDC->getEnclosingNamespaceContext(); - - // Look up through our scopes until we find one with an entity which - // matches our declaration context. - while (S->getEntity() && - ((DeclContext *)S->getEntity())->getPrimaryContext() != SearchDC) { - S = S->getParent(); - assert(S && "No enclosing scope matching the enclosing namespace."); - } } // In C++, look for a shadow friend decl. |