[cfe-commits] r89557 - in /cfe/trunk/lib/Sema: Sema.h SemaOverload.cpp
John McCall
rjmccall at apple.com
Sat Nov 21 01:38:42 PST 2009
Author: rjmccall
Date: Sat Nov 21 03:38:42 2009
New Revision: 89557
URL: http://llvm.org/viewvc/llvm-project?rev=89557&view=rev
Log:
Overload resolution doesn't decide whether to do ADL or not anymore; stopping
threading that state.
Modified:
cfe/trunk/lib/Sema/Sema.h
cfe/trunk/lib/Sema/SemaOverload.cpp
Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=89557&r1=89556&r2=89557&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Sat Nov 21 03:38:42 2009
@@ -961,7 +961,7 @@
void AddOverloadedCallCandidates(llvm::SmallVectorImpl<NamedDecl*>& Callees,
DeclarationName &UnqualifiedName,
- bool &ArgumentDependentLookup,
+ bool ArgumentDependentLookup,
bool HasExplicitTemplateArgs,
const TemplateArgumentLoc *ExplicitTemplateArgs,
unsigned NumExplicitTemplateArgs,
@@ -979,7 +979,7 @@
Expr **Args, unsigned NumArgs,
SourceLocation *CommaLocs,
SourceLocation RParenLoc,
- bool &ArgumentDependentLookup);
+ bool ArgumentDependentLookup);
OwningExprResult CreateOverloadedUnaryOp(SourceLocation OpLoc,
unsigned Opc,
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=89557&r1=89556&r2=89557&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Sat Nov 21 03:38:42 2009
@@ -4509,7 +4509,6 @@
/// \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 @@
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 @@
ExplicitTemplateArgs,
NumExplicitTemplateArgs,
Args, NumArgs, CandidateSet);
-
- if (FuncTemplate->getDeclContext()->isRecord())
- ArgumentDependentLookup = false;
return;
}
@@ -4551,7 +4543,7 @@
/// 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 @@
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 @@
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
More information about the cfe-commits
mailing list