diff options
| author | John McCall <rjmccall@apple.com> | 2009-11-21 09:38:42 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2009-11-21 09:38:42 +0000 |
| commit | 4b1f16e6f80cb06985323750d044ed88d94496f4 (patch) | |
| tree | 1ad52fbddbcaecfc36a18c0a2b665174b38aeb3f /clang/lib | |
| parent | 88ad4c5d020b8e6cfd04ee1cec7b24ea2cafd59e (diff) | |
| download | bcm5719-llvm-4b1f16e6f80cb06985323750d044ed88d94496f4.tar.gz bcm5719-llvm-4b1f16e6f80cb06985323750d044ed88d94496f4.zip | |
Overload resolution doesn't decide whether to do ADL or not anymore; stopping
threading that state.
llvm-svn: 89557
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/Sema.h | 4 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 15 |
2 files changed, 5 insertions, 14 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index e26df119fa5..d3acc5f710a 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -961,7 +961,7 @@ public: void AddOverloadedCallCandidates(llvm::SmallVectorImpl<NamedDecl*>& Callees, DeclarationName &UnqualifiedName, - bool &ArgumentDependentLookup, + bool ArgumentDependentLookup, bool HasExplicitTemplateArgs, const TemplateArgumentLoc *ExplicitTemplateArgs, unsigned NumExplicitTemplateArgs, @@ -979,7 +979,7 @@ public: Expr **Args, unsigned NumArgs, SourceLocation *CommaLocs, SourceLocation RParenLoc, - bool &ArgumentDependentLookup); + bool ArgumentDependentLookup); OwningExprResult CreateOverloadedUnaryOp(SourceLocation OpLoc, unsigned Opc, diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 45729116c3e..5e9d101d385 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -4509,7 +4509,6 @@ Sema::ResolveAddressOfOverloadedFunction(Expr *From, QualType ToType, /// \brief Add a single candidate to the overload set. static void AddOverloadedCallCandidate(Sema &S, NamedDecl *Callee, - bool &ArgumentDependentLookup, bool HasExplicitTemplateArgs, const TemplateArgumentLoc *ExplicitTemplateArgs, unsigned NumExplicitTemplateArgs, @@ -4523,10 +4522,6 @@ static void AddOverloadedCallCandidate(Sema &S, assert(!HasExplicitTemplateArgs && "Explicit template arguments?"); S.AddOverloadCandidate(Func, Args, NumArgs, CandidateSet, false, false, PartialOverloading); - - if (Func->getDeclContext()->isRecord() || - Func->getDeclContext()->isFunctionOrMethod()) - ArgumentDependentLookup = false; return; } @@ -4536,9 +4531,6 @@ static void AddOverloadedCallCandidate(Sema &S, ExplicitTemplateArgs, NumExplicitTemplateArgs, Args, NumArgs, CandidateSet); - - if (FuncTemplate->getDeclContext()->isRecord()) - ArgumentDependentLookup = false; return; } @@ -4551,7 +4543,7 @@ static void AddOverloadedCallCandidate(Sema &S, /// dependent lookup to the given overload set. void Sema::AddOverloadedCallCandidates(llvm::SmallVectorImpl<NamedDecl*> &Fns, DeclarationName &UnqualifiedName, - bool &ArgumentDependentLookup, + bool ArgumentDependentLookup, bool HasExplicitTemplateArgs, const TemplateArgumentLoc *ExplicitTemplateArgs, unsigned NumExplicitTemplateArgs, @@ -4589,8 +4581,7 @@ void Sema::AddOverloadedCallCandidates(llvm::SmallVectorImpl<NamedDecl*> &Fns, for (llvm::SmallVectorImpl<NamedDecl*>::iterator I = Fns.begin(), E = Fns.end(); I != E; ++I) - AddOverloadedCallCandidate(*this, *I, ArgumentDependentLookup, - HasExplicitTemplateArgs, + AddOverloadedCallCandidate(*this, *I, HasExplicitTemplateArgs, ExplicitTemplateArgs, NumExplicitTemplateArgs, Args, NumArgs, CandidateSet, PartialOverloading); @@ -4621,7 +4612,7 @@ FunctionDecl *Sema::ResolveOverloadedCallFn(Expr *Fn, Expr **Args, unsigned NumArgs, SourceLocation *CommaLocs, SourceLocation RParenLoc, - bool &ArgumentDependentLookup) { + bool ArgumentDependentLookup) { OverloadCandidateSet CandidateSet; // Add the functions denoted by Callee to the set of candidate |

