How can clang emit error without notes?

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?


I think I would try using a custom DiagnosticConsumer instead, but as usual, What Are You Really Trying To Do?™

I’m trying to disable specific notes which may be more confusing than helpful in some cases.
For instance note_ovl_candidate_bad_overload may emit a long page of possible overloads for a one-letter mistake in typing, which isn’t really helpful.

I was hoping to disable notes using mapping just like warnings but discovered that notes are handled as a special case and can’t be mapped.