summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-11-21 08:51:07 +0000
committerJohn McCall <rjmccall@apple.com>2009-11-21 08:51:07 +0000
commitd14a86427f9cd8e5bc1a114b703f21cf21eefa9c (patch)
tree314e55fa377fd7a883e71b581792dc4d2f5cd424 /clang/lib/Sema/SemaCodeComplete.cpp
parent96d5c76498b26bdf6e6ded4f166085a11c1738a4 (diff)
downloadbcm5719-llvm-d14a86427f9cd8e5bc1a114b703f21cf21eefa9c.tar.gz
bcm5719-llvm-d14a86427f9cd8e5bc1a114b703f21cf21eefa9c.zip
"Incremental" progress on using expressions, by which I mean totally ripping
into pretty much everything about overload resolution in order to wean BuildDeclarationNameExpr off LookupResult::getAsSingleDecl(). Replace UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the idea of a non-member lookup that we haven't totally resolved yet, whether by overloading, argument-dependent lookup, or (eventually) the presence of a function template in the lookup results. Incidentally fixes a problem with argument-dependent lookup where we were still performing ADL even when the lookup results contained something from a block scope. Incidentally improves a diagnostic when using an ObjC ivar from a class method. This just fell out from rewriting BuildDeclarationNameExpr's interaction with lookup, and I'm too apathetic to break it out. The only remaining uses of OverloadedFunctionDecl that I know of are in TemplateName and MemberExpr. llvm-svn: 89544
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 6dbb4426c20..203b421c913 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -1467,7 +1467,7 @@ void Sema::CodeCompleteCall(Scope *S, ExprTy *FnIn,
Expr::hasAnyTypeDependentArguments(Args, NumArgs))
return;
- NamedDecl *Function;
+ llvm::SmallVector<NamedDecl*,8> Fns;
DeclarationName UnqualifiedName;
NestedNameSpecifier *Qualifier;
SourceRange QualifierRange;
@@ -1476,8 +1476,7 @@ void Sema::CodeCompleteCall(Scope *S, ExprTy *FnIn,
const TemplateArgumentLoc *ExplicitTemplateArgs;
unsigned NumExplicitTemplateArgs;
- DeconstructCallFunction(Fn,
- Function, UnqualifiedName, Qualifier, QualifierRange,
+ DeconstructCallFunction(Fn, Fns, UnqualifiedName, Qualifier, QualifierRange,
ArgumentDependentLookup, HasExplicitTemplateArgs,
ExplicitTemplateArgs, NumExplicitTemplateArgs);
@@ -1488,7 +1487,7 @@ void Sema::CodeCompleteCall(Scope *S, ExprTy *FnIn,
// Build an overload candidate set based on the functions we find.
OverloadCandidateSet CandidateSet;
- AddOverloadedCallCandidates(Function, UnqualifiedName,
+ AddOverloadedCallCandidates(Fns, UnqualifiedName,
ArgumentDependentLookup, HasExplicitTemplateArgs,
ExplicitTemplateArgs, NumExplicitTemplateArgs,
Args, NumArgs,
OpenPOWER on IntegriCloud