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

Jordan Rose jordan_rose at apple.com
Fri Nov 8 09:37:14 PST 2013


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


On Nov 7, 2013, at 3:08 , Yaron Keren <yaron.keren at gmail.com> wrote:

> 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
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131108/758b8c29/attachment.html>


More information about the cfe-dev mailing list