Skip to content

Commit

Permalink
Merge note_ovl_builtin_candidate diagnostics; NFC
Browse files Browse the repository at this point in the history
There is no difference between the unary and binary case, so
merge them.

llvm-svn: 371403
  • Loading branch information
svenvh committed Sep 9, 2019
1 parent e237520 commit 783fc95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions clang/include/clang/Basic/DiagnosticSemaKinds.td
Expand Up @@ -3920,10 +3920,7 @@ def note_implicit_member_target_infer_collision : Note<

def note_ambiguous_type_conversion: Note<
"because of ambiguity in conversion %diff{of $ to $|between types}0,1">;
def note_ovl_builtin_binary_candidate : Note<
"built-in candidate %0">;
def note_ovl_builtin_unary_candidate : Note<
"built-in candidate %0">;
def note_ovl_builtin_candidate : Note<"built-in candidate %0">;
def err_ovl_no_viable_function_in_init : Error<
"no matching constructor for initialization of %0">;
def err_ovl_no_conversion_in_cast : Error<
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Sema/SemaOverload.cpp
Expand Up @@ -10547,12 +10547,12 @@ static void NoteBuiltinOperatorCandidate(Sema &S, StringRef Opc,
TypeStr += Cand->BuiltinParamTypes[0].getAsString();
if (Cand->Conversions.size() == 1) {
TypeStr += ")";
S.Diag(OpLoc, diag::note_ovl_builtin_unary_candidate) << TypeStr;
S.Diag(OpLoc, diag::note_ovl_builtin_candidate) << TypeStr;
} else {
TypeStr += ", ";
TypeStr += Cand->BuiltinParamTypes[1].getAsString();
TypeStr += ")";
S.Diag(OpLoc, diag::note_ovl_builtin_binary_candidate) << TypeStr;
S.Diag(OpLoc, diag::note_ovl_builtin_candidate) << TypeStr;
}
}

Expand Down

0 comments on commit 783fc95

Please sign in to comment.