[cfe-dev] How can clang emit error without notes?

Yaron Keren yaron.keren at gmail.com
Thu Nov 7 03:08:16 PST 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131107/2bd4604f/attachment.html>


More information about the cfe-dev mailing list