From c392148414b29084171d6769d86e17ea560bdf53 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Tue, 3 Apr 2012 21:44:08 +0000 Subject: Remove more redundant lookups. Add a new "all_lookups_iterator" which provides a view over the contents of a DeclContext without exposing the implementation details of the StoredDeclsMap. Use this in LookupVisibleDecls to find the visible declarations. Fixes PR12339! llvm-svn: 153970 --- clang/lib/Sema/SemaCodeComplete.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'clang/lib/Sema/SemaCodeComplete.cpp') diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index 3fd66ec0429..c09cd177bee 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -514,14 +514,6 @@ bool ResultBuilder::isInterestingDecl(NamedDecl *ND, return false; } } - - // Skip out-of-line declarations and definitions. - // NOTE: Unless it's an Objective-C property, method, or ivar, where - // the contexts can be messy. - if (!ND->getDeclContext()->Equals(ND->getLexicalDeclContext()) && - !(isa(ND) || isa(ND) || - isa(ND))) - return false; if (Filter == &ResultBuilder::IsNestedNameSpecifier || ((isa(ND) || isa(ND)) && @@ -904,7 +896,7 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext, if (Hiding && CheckHiddenResult(R, CurContext, Hiding)) return; - + // Make sure that any given declaration only shows up in the result set once. if (!AllDeclsFound.insert(R.Declaration->getCanonicalDecl())) return; -- cgit v1.2.3