зеркало из https://github.com/microsoft/clang-1.git
remove "; candidates are/is:" from various ambiguity diagnostics.
2 out of 2 people on irc prefer them gone :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64749 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
a180fdd8fd
Коммит
4330d65797
|
@ -461,33 +461,29 @@ DIAG(err_ovl_static_nonstatic_member, ERROR,
|
||||||
"static and non-static member functions with the same parameter types "
|
"static and non-static member functions with the same parameter types "
|
||||||
"cannot be overloaded")
|
"cannot be overloaded")
|
||||||
DIAG(err_ovl_no_viable_function_in_call, ERROR,
|
DIAG(err_ovl_no_viable_function_in_call, ERROR,
|
||||||
"no matching function for call to %0"
|
"no matching function for call to %0")
|
||||||
"%plural{0:|1:; candidate is|:; candidates are:}1")
|
|
||||||
DIAG(err_ovl_no_viable_member_function_in_call, ERROR,
|
DIAG(err_ovl_no_viable_member_function_in_call, ERROR,
|
||||||
"no matching member function for call to %0"
|
"no matching member function for call to %0")
|
||||||
"%plural{0:|1:; candidate is|:; candidates are:}1")
|
|
||||||
DIAG(err_ovl_ambiguous_call, ERROR,
|
DIAG(err_ovl_ambiguous_call, ERROR,
|
||||||
"call to %0 is ambiguous; candidates are:")
|
"call to %0 is ambiguous")
|
||||||
DIAG(err_ovl_ambiguous_member_call, ERROR,
|
DIAG(err_ovl_ambiguous_member_call, ERROR,
|
||||||
"call to member function %0 is ambiguous; candidates are:")
|
"call to member function %0 is ambiguous")
|
||||||
DIAG(err_ovl_candidate, NOTE,
|
DIAG(err_ovl_candidate, NOTE,
|
||||||
"candidate function")
|
"candidate function")
|
||||||
DIAG(err_ovl_builtin_candidate, NOTE,
|
DIAG(err_ovl_builtin_candidate, NOTE,
|
||||||
"built-in candidate function %0")
|
"built-in candidate function %0")
|
||||||
DIAG(err_ovl_no_viable_function_in_init, ERROR,
|
DIAG(err_ovl_no_viable_function_in_init, ERROR,
|
||||||
"no matching constructor for initialization of %0"
|
"no matching constructor for initialization of %0")
|
||||||
"%plural{0:|1:; candidate is|:; candidates are:}1")
|
|
||||||
DIAG(err_ovl_ambiguous_init, ERROR,
|
DIAG(err_ovl_ambiguous_init, ERROR,
|
||||||
"call to constructor of %0 is ambiguous; candidates are:")
|
"call to constructor of %0 is ambiguous")
|
||||||
DIAG(err_ovl_ambiguous_oper, ERROR,
|
DIAG(err_ovl_ambiguous_oper, ERROR,
|
||||||
"use of overloaded operator '%0' is ambiguous; candidates are:")
|
"use of overloaded operator '%0' is ambiguous")
|
||||||
DIAG(err_ovl_no_viable_oper, ERROR,
|
DIAG(err_ovl_no_viable_oper, ERROR,
|
||||||
"no viable overloaded '%0'; candidate%plural{1: is|:s are}1:")
|
"no viable overloaded '%0'")
|
||||||
DIAG(err_ovl_no_viable_object_call, ERROR,
|
DIAG(err_ovl_no_viable_object_call, ERROR,
|
||||||
"no matching function for call to object of type %0"
|
"no matching function for call to object of type %0")
|
||||||
"%plural{0:|1:; candidate is|:; candidates are:}1")
|
|
||||||
DIAG(err_ovl_ambiguous_object_call, ERROR,
|
DIAG(err_ovl_ambiguous_object_call, ERROR,
|
||||||
"call to object of type %0 is ambiguous; candidates are:")
|
"call to object of type %0 is ambiguous")
|
||||||
DIAG(err_ovl_surrogate_cand, NOTE,
|
DIAG(err_ovl_surrogate_cand, NOTE,
|
||||||
"conversion candidate of type %0")
|
"conversion candidate of type %0")
|
||||||
DIAG(err_member_call_without_object, ERROR,
|
DIAG(err_member_call_without_object, ERROR,
|
||||||
|
|
|
@ -1636,10 +1636,10 @@ Sema::PerformInitializationByConstructor(QualType ClassType,
|
||||||
case OR_No_Viable_Function:
|
case OR_No_Viable_Function:
|
||||||
if (InitEntity)
|
if (InitEntity)
|
||||||
Diag(Loc, diag::err_ovl_no_viable_function_in_init)
|
Diag(Loc, diag::err_ovl_no_viable_function_in_init)
|
||||||
<< InitEntity << (unsigned)CandidateSet.size() << Range;
|
<< InitEntity << Range;
|
||||||
else
|
else
|
||||||
Diag(Loc, diag::err_ovl_no_viable_function_in_init)
|
Diag(Loc, diag::err_ovl_no_viable_function_in_init)
|
||||||
<< ClassType << (unsigned)CandidateSet.size() << Range;
|
<< ClassType << Range;
|
||||||
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
|
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -428,7 +428,7 @@ bool Sema::FindAllocationOverload(SourceLocation StartLoc, SourceRange Range,
|
||||||
if (AllowMissing)
|
if (AllowMissing)
|
||||||
return false;
|
return false;
|
||||||
return Diag(StartLoc, diag::err_ovl_no_viable_function_in_call)
|
return Diag(StartLoc, diag::err_ovl_no_viable_function_in_call)
|
||||||
<< Name << 0 << Range;
|
<< Name << Range;
|
||||||
}
|
}
|
||||||
|
|
||||||
OverloadCandidateSet Candidates;
|
OverloadCandidateSet Candidates;
|
||||||
|
@ -464,7 +464,7 @@ bool Sema::FindAllocationOverload(SourceLocation StartLoc, SourceRange Range,
|
||||||
if (AllowMissing)
|
if (AllowMissing)
|
||||||
return false;
|
return false;
|
||||||
Diag(StartLoc, diag::err_ovl_no_viable_function_in_call)
|
Diag(StartLoc, diag::err_ovl_no_viable_function_in_call)
|
||||||
<< Name << (unsigned)Candidates.size() << Range;
|
<< Name << Range;
|
||||||
PrintOverloadCandidates(Candidates, /*OnlyViable=*/false);
|
PrintOverloadCandidates(Candidates, /*OnlyViable=*/false);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -3635,8 +3635,7 @@ FunctionDecl *Sema::ResolveOverloadedCallFn(Expr *Fn, NamedDecl *Callee,
|
||||||
case OR_No_Viable_Function:
|
case OR_No_Viable_Function:
|
||||||
Diag(Fn->getSourceRange().getBegin(),
|
Diag(Fn->getSourceRange().getBegin(),
|
||||||
diag::err_ovl_no_viable_function_in_call)
|
diag::err_ovl_no_viable_function_in_call)
|
||||||
<< UnqualifiedName << (unsigned)CandidateSet.size()
|
<< UnqualifiedName << Fn->getSourceRange();
|
||||||
<< Fn->getSourceRange();
|
|
||||||
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
|
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -3705,8 +3704,7 @@ Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE,
|
||||||
case OR_No_Viable_Function:
|
case OR_No_Viable_Function:
|
||||||
Diag(MemExpr->getSourceRange().getBegin(),
|
Diag(MemExpr->getSourceRange().getBegin(),
|
||||||
diag::err_ovl_no_viable_member_function_in_call)
|
diag::err_ovl_no_viable_member_function_in_call)
|
||||||
<< Ovl->getDeclName() << (unsigned)CandidateSet.size()
|
<< Ovl->getDeclName() << MemExprE->getSourceRange();
|
||||||
<< MemExprE->getSourceRange();
|
|
||||||
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
|
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
|
||||||
// FIXME: Leaking incoming expressions!
|
// FIXME: Leaking incoming expressions!
|
||||||
return true;
|
return true;
|
||||||
|
@ -3823,8 +3821,7 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Object,
|
||||||
case OR_No_Viable_Function:
|
case OR_No_Viable_Function:
|
||||||
Diag(Object->getSourceRange().getBegin(),
|
Diag(Object->getSourceRange().getBegin(),
|
||||||
diag::err_ovl_no_viable_object_call)
|
diag::err_ovl_no_viable_object_call)
|
||||||
<< Object->getType() << (unsigned)CandidateSet.size()
|
<< Object->getType() << Object->getSourceRange();
|
||||||
<< Object->getSourceRange();
|
|
||||||
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
|
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -3984,8 +3981,7 @@ Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc,
|
||||||
<< BasePtr->getType() << BasePtr->getSourceRange();
|
<< BasePtr->getType() << BasePtr->getSourceRange();
|
||||||
else
|
else
|
||||||
Diag(OpLoc, diag::err_ovl_no_viable_oper)
|
Diag(OpLoc, diag::err_ovl_no_viable_oper)
|
||||||
<< "operator->" << (unsigned)CandidateSet.size()
|
<< "operator->" << BasePtr->getSourceRange();
|
||||||
<< BasePtr->getSourceRange();
|
|
||||||
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
|
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче