[PATCH 0/2] Re: [PATCH] C/C++: add fix-it hints for various missing symbols

2017-09-26 Thread David Malcolm
On Mon, 2017-08-28 at 09:22 -0600, Jeff Law wrote: > On 07/03/2017 12:37 PM, David Malcolm wrote: > > This patch improves our C/C++ frontends' handling of missing > > symbols, by making c_parser_require and cp_parser_require use > > "better" locations for the diagnostic, and insert fix-it hints, >

Re: [PATCH] C/C++: add fix-it hints for various missing symbols

2017-08-28 Thread Jeff Law
On 07/03/2017 12:37 PM, David Malcolm wrote: > This patch improves our C/C++ frontends' handling of missing > symbols, by making c_parser_require and cp_parser_require use > "better" locations for the diagnostic, and insert fix-it hints, > under certain circumstances (see the comments in the patch

Re: [PATCH] C/C++: add fix-it hints for various missing symbols

2017-07-05 Thread Joseph Myers
On Wed, 5 Jul 2017, David Malcolm wrote: > This error message might be better to be worded in terms of the > syntactic thing that came before, which would yield: > > pr7356.c:1:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > after declaration > a//sample > ^ > > or somesuch. Doi

Re: [PATCH] C/C++: add fix-it hints for various missing symbols

2017-07-05 Thread David Malcolm
On Mon, 2017-07-03 at 23:01 +, Joseph Myers wrote: > Does the changed location fix bug 7356? The patch as-written doesn't affect that bug, since the patch only affects sites that use c_parser_require and cp_parser_require with certain token types, and the diagnostic in PR 7356 is emitted by th

Re: [PATCH] C/C++: add fix-it hints for various missing symbols

2017-07-03 Thread Joseph Myers
Does the changed location fix bug 7356? -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] C/C++: add fix-it hints for various missing symbols

2017-07-03 Thread David Malcolm
On Mon, 2017-07-03 at 19:57 +0100, Richard Sandiford wrote: > [Thanks for all your diagnostic work btw.] > > David Malcolm writes: > > clang can also print notes about matching opening symbols > > e.g. the note here: > > > > missing-symbol-2.c:25:22: error: expected ']' > > const char test

Re: [PATCH] C/C++: add fix-it hints for various missing symbols

2017-07-03 Thread Richard Sandiford
[Thanks for all your diagnostic work btw.] David Malcolm writes: > clang can also print notes about matching opening symbols > e.g. the note here: > > missing-symbol-2.c:25:22: error: expected ']' > const char test [42; >^ > missing-symbol-2.c:25:19: note: to match

[PATCH] C/C++: add fix-it hints for various missing symbols

2017-07-03 Thread David Malcolm
This patch improves our C/C++ frontends' handling of missing symbols, by making c_parser_require and cp_parser_require use "better" locations for the diagnostic, and insert fix-it hints, under certain circumstances (see the comments in the patch for full details). For example, for this code with a