diff options
author | David Malcolm <dmalcolm@redhat.com> | 2018-05-01 00:10:10 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2018-05-01 00:10:10 +0000 |
commit | 1a3a7b4eeb0444148adc4f007b91e120814c4cc5 (patch) | |
tree | ea1a9a931bb387718caee06b1c2785faf6296e9c /gcc/vec.c | |
parent | 47ae164c051c575234f4bef916f10346765d9565 (diff) | |
download | gcc-1a3a7b4eeb0444148adc4f007b91e120814c4cc5.zip gcc-1a3a7b4eeb0444148adc4f007b91e120814c4cc5.tar.gz gcc-1a3a7b4eeb0444148adc4f007b91e120814c4cc5.tar.bz2 |
Add gcc_rich_location::add_fixit_insert_formatted
This patch adds a support function to class gcc_rich_location
to make it easier for fix-it hints to use idiomatic C/C++
indentation, for use by the patch for PR c++/85523.
gcc/ChangeLog:
PR c++/85523
* gcc-rich-location.c (blank_line_before_p): New function.
(use_new_line): New function.
(gcc_rich_location::add_fixit_insert_formatted): New function.
* gcc-rich-location.h
(gcc_rich_location::add_fixit_insert_formatted): New function.
gcc/testsuite/ChangeLog:
PR c++/85523
* gcc.dg/plugin/diagnostic-test-show-locus-generate-patch.c
(test_add_fixit_insert_formatted_single_line): New function.
(test_add_fixit_insert_formatted_multiline): New function.
Extend expected output of generated patch to include fix-it hints
for these.
* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c: Include
"gcc-rich-location.h". Add test coverage for
gcc_rich_location::add_fixit_insert_formatted.
From-SVN: r259783
Diffstat (limited to 'gcc/vec.c')
0 files changed, 0 insertions, 0 deletions