Re: [PATCH 01/02] PR/62314: add ability to add fixit-hints

2015-11-25 Thread Bernd Schmidt
On 11/24/2015 09:03 PM, Jeff Law wrote: Although this looks weird, it's deliberate, and follows the pattern earlier in those test files: the diagnostics are injected by the plugin, not by cc1. The plugin gives us a way of unit-testing how diagnostic_show_locus handles the various ways of callin

Re: [PATCH 01/02] PR/62314: add ability to add fixit-hints

2015-11-24 Thread Jeff Law
On 11/18/2015 03:25 PM, David Malcolm wrote: What is the purpose of the #if 0 code in the various tests? Did you mean to leave those in? Presumably you're referring to the bodies of the functions test_fixit_insert test_fixit_remove test_fixit_replace within: gcc/testsuite/gcc.dg

Re: [PATCH 01/02] PR/62314: add ability to add fixit-hints

2015-11-18 Thread David Malcolm
On Wed, 2015-11-18 at 14:57 -0700, Jeff Law wrote: > On 11/10/2015 09:35 AM, David Malcolm wrote: > > This patch adds the ability to add "fix-it hints" to a rich_location, > > which will be displayed when the corresponding diagnostic is printed. > > > > It does not actually add any fix-it hints (th

Re: [PATCH 01/02] PR/62314: add ability to add fixit-hints

2015-11-18 Thread Jeff Law
On 11/10/2015 09:35 AM, David Malcolm wrote: This patch adds the ability to add "fix-it hints" to a rich_location, which will be displayed when the corresponding diagnostic is printed. It does not actually add any fix-it hints (that comes in the second patch), but it adds test coverage of the ma

Re: [PATCH 01/02] PR/62314: add ability to add fixit-hints

2015-11-10 Thread David Malcolm
On Tue, 2015-11-10 at 17:26 +0100, Bernd Schmidt wrote: > On 11/10/2015 05:35 PM, David Malcolm wrote: > > + /* Nasty workaround to convince the linker to add > > + rich_location::add_fixit_insert > > + rich_location::add_fixit_remove > > + rich_location::add_fixit_replace > > +

Re: [PATCH 01/02] PR/62314: add ability to add fixit-hints

2015-11-10 Thread Bernd Schmidt
On 11/10/2015 05:35 PM, David Malcolm wrote: + /* Nasty workaround to convince the linker to add + rich_location::add_fixit_insert + rich_location::add_fixit_remove + rich_location::add_fixit_replace + to cc1 for use by diagnostic_plugin_test_show_locus, + before anything

[PATCH 01/02] PR/62314: add ability to add fixit-hints

2015-11-10 Thread David Malcolm
This patch adds the ability to add "fix-it hints" to a rich_location, which will be displayed when the corresponding diagnostic is printed. It does not actually add any fix-it hints (that comes in the second patch), but it adds test coverage of the machinery and printing, by using the existing dia