[cfe-dev] Ranges for diagnostics

Dmitri Gribenko gribozavr at gmail.com
Fri Jan 24 07:08:53 PST 2014

On Fri, Jan 24, 2014 at 4:26 PM, Milian Wolff <mail at milianw.de> wrote:
> Is there a reason why some diagnostics only have a cursor pointing to the
> beginning of a token, while others are underlined properly?

I think the reason is that we don't have a policy on this, so in each
separate case the decision was made by the developer implementing that
diagnostic.  Do you have any suggestions for consistent guidelines on

> Would patches be accepted to add ranges to these diagnostics? Where would I
> have to look in the codebase?

This should not be complex.  Given the diagnostic text, find the
diagnostic name in
llvm/tools/clang/include/clang/Basic/Diagnostic*.td.  Then, grep for
the diagnostic name in sources and add the source range to diag()


(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/

More information about the cfe-dev mailing list