Move code completion for qualified name lookup (foo::) to
LookupVisibleDecls. Also, a function does not hide another function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93421 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 88da7e8..d7ee958 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -1942,6 +1942,12 @@
           (*I)->getIdentifierNamespace() != IDNS)
         continue;
 
+      // Functions and function templates overload rather than hide.
+      // FIXME: Look for hiding based on function signatures!
+      if ((*I)->isFunctionOrFunctionTemplate() &&
+          ND->isFunctionOrFunctionTemplate())
+        continue;
+          
       // We've found a declaration that hides this one.
       return *I;
     }