Revert the fix for PR8013.
That bug concerned the well-formedness of code such as (&ovl)(a, b, c). GCC rejects the code, while EDG accepts it. On further study of the standard, I see no support for EDG's position: in particular, C++ [over.over] does not list this as a context where we can take the address of an overloaded function, C++ [over.call.func] does not reference the address-of operator at any point, and C++ [expr.call] claims that the function argument in a call is either a function lvalue or a pointer-to-function; (&ovl) is neither. llvm-svn: 118620
This commit is contained in:
@@ -3306,10 +3306,6 @@ void Sema::CodeCompleteCall(Scope *S, ExprTy *FnIn,
|
||||
llvm::SmallVector<ResultCandidate, 8> Results;
|
||||
|
||||
Expr *NakedFn = Fn->IgnoreParenCasts();
|
||||
if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(NakedFn))
|
||||
if (UnOp->getOpcode() == UO_AddrOf)
|
||||
NakedFn = UnOp->getSubExpr()->IgnoreParens();
|
||||
|
||||
if (UnresolvedLookupExpr *ULE = dyn_cast<UnresolvedLookupExpr>(NakedFn))
|
||||
AddOverloadedCallCandidates(ULE, Args, NumArgs, CandidateSet,
|
||||
/*PartialOverloading=*/ true);
|
||||
|
||||
Reference in New Issue
Block a user