[PATCH 1/2] C++: avoid partial duplicate implementation of cp_parser_error

Jason Merrill jason@redhat.com
Wed Oct 11 21:21:00 GMT 2017


On Tue, Sep 26, 2017 at 9:56 AM, David Malcolm <dmalcolm@redhat.com> wrote:
> In r251026 (aka 3fe34694f0990d1d649711ede0326497f8a849dc,
> "C/C++: show pertinent open token when missing a close token")
> I copied part of cp_parser_error into cp_parser_required_error,
> leading to duplication of code.
>
> This patch eliminates this duplication by merging the two copies of the
> code into a new cp_parser_error_1 subroutine.
>
> Doing so removes an indentation level, making the patch appear to have
> more churn than it really does.

FWIW, you could also attach a patch generated with -w to ignore
whitespace changes.

The patch is OK.

Jason



More information about the Gcc-patches mailing list