I’m trying to have a clang emit an error message without the associated notes.
First tried to use mapping:
Diags.setDiagnosticMapping(diag::note_ovl_candidate_bad_overload, diag::MAP_IGNORE, SourceLocation());
which did not work, since DiagnosticIDs::getDiagnosticLevel specifically ignores the mapping for notes:
unsigned DiagClass = getBuiltinDiagClass(DiagID);
if (DiagClass == CLASS_NOTE) return DiagnosticIDs::Note;
return getDiagnosticLevel(DiagID, DiagClass, Loc, Diag);
is there another way?
Yaron