[cfe-dev] How can clang emit error without notes?
Yaron Keren
yaron.keren at gmail.com
Fri Nov 8 13:29:45 PST 2013
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.
Yaron
2013/11/8 Jordan Rose <jordan_rose at apple.com>
> 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/1440ddc7/attachment.html>
More information about the cfe-dev
mailing list