Fix our semantic analysis of
unqualified-id '('
in C++. The unqualified-id might not refer to any declaration in our
current scope, but declarations by that name might be found via
argument-dependent lookup. We now do so properly.
As part of this change, CXXDependentNameExpr, which was previously
designed to express the unqualified-id in the above constructor within
templates, has become UnresolvedFunctionNameExpr, which does
effectively the same thing but will work for both templates and
non-templates.
Additionally, we cope with all unqualified-ids, since ADL also applies
in cases like
operator+(x, y)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63733 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 3143b5c..6b8d852 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -517,12 +517,13 @@
bool Complain);
void FixOverloadedFunctionReference(Expr *E, FunctionDecl *Fn);
- FunctionDecl *ResolveOverloadedCallFn(Expr *Fn, NamedDecl *Func,
+ FunctionDecl *ResolveOverloadedCallFn(Expr *Fn, NamedDecl *Callee,
+ DeclarationName UnqualifiedName,
SourceLocation LParenLoc,
Expr **Args, unsigned NumArgs,
SourceLocation *CommaLocs,
SourceLocation RParenLoc,
- bool ArgumentDependentLookup);
+ bool &ArgumentDependentLookup);
ExprResult
BuildCallToMemberFunction(Scope *S, Expr *MemExpr,
SourceLocation LParenLoc, Expr **Args,
@@ -1068,7 +1069,6 @@
DeclarationName Name,
bool HasTrailingLParen,
const CXXScopeSpec *SS,
- bool ForceResolution = false,
bool isAddressOfOperand = false);
virtual OwningExprResult ActOnPredefinedExpr(SourceLocation Loc,