gcc/libcpp
David Malcolm 3131620863 fix-it hints can't contain newlines
I hope to implement newline support within fix-it hints at some point,
but currently it's not supported, and leads to misleading diagnostic
output, so for now, fail gracefully.

gcc/ChangeLog:
	* diagnostic-show-locus.c
	(selftest::test_fixit_insert_containing_newline): New function.
	(selftest::test_fixit_replace_containing_newline): New function.
	(selftest::diagnostic_show_locus_c_tests): Call the above.

libcpp/ChangeLog:
	* include/line-map.h (class rich_location): Note that newlines
	aren't supported in fix-it text.
	* line-map.c (rich_location::add_fixit_insert_before): Reject
	attempts to add fix-its containing newlines.
	(rich_location::add_fixit_replace): Likewise.

From-SVN: r240169
2016-09-15 23:57:01 +00:00
..
include fix-it hints can't contain newlines 2016-09-15 23:57:01 +00:00
po Regenerate .pot files. 2016-08-19 22:06:53 +01:00
ChangeLog fix-it hints can't contain newlines 2016-09-15 23:57:01 +00:00
ChangeLog.jit
Makefile.in Update copyright years. 2016-01-04 15:30:50 +01:00
aclocal.m4 libcpp: Bump to automake 1.11.6 2015-05-13 11:02:17 +00:00
charset.c Fix crash in selftest::test_lexer_string_locations_ucn4 (PR bootstrap/72823) 2016-08-06 18:06:30 +00:00
config.in Change ENABLE_VALGRIND_CHECKING to 2016-05-20 08:03:25 +00:00
configure Change ENABLE_VALGRIND_CHECKING to 2016-05-20 08:03:25 +00:00
configure.ac Change ENABLE_VALGRIND_CHECKING to 2016-05-20 08:03:25 +00:00
directives-only.c Update copyright years. 2016-01-04 15:30:50 +01:00
directives.c Spelling suggestions for misspelled preprocessor directives 2016-08-18 18:52:43 +00:00
errors.c Spelling suggestions for misspelled preprocessor directives 2016-08-18 18:52:43 +00:00
expr.c Implement C _FloatN, _FloatNx types. 2016-08-19 18:43:26 +01:00
files.c libcpp: Tweak to missing #include source location 2016-06-22 15:29:21 +00:00
identifiers.c Update copyright years. 2016-01-04 15:30:50 +01:00
init.c libcpp: Tweak to missing #include source location 2016-06-22 15:29:21 +00:00
internal.h On-demand locations within string-literals 2016-08-05 18:08:33 +00:00
lex.c re PR c/7652 (-Wswitch-break : Warn if a switch case falls through) 2016-08-12 10:30:47 +00:00
line-map.c fix-it hints can't contain newlines 2016-09-15 23:57:01 +00:00
location-example.txt Source range tracking in libcpp and C FE, with bit-packing optimization 2015-11-13 16:29:59 +00:00
macro.c re PR c/7652 (-Wswitch-break : Warn if a switch case falls through) 2016-08-12 10:30:47 +00:00
makeucnid.c Update copyright years. 2016-01-04 15:30:50 +01:00
mkdeps.c Update copyright years. 2016-01-04 15:30:50 +01:00
pch.c re PR c/7652 (-Wswitch-break : Warn if a switch case falls through) 2016-08-18 10:28:03 +00:00
symtab.c Update copyright years. 2016-01-04 15:30:50 +01:00
system.h Update copyright years. 2016-01-04 15:30:50 +01:00
traditional.c Update copyright years. 2016-01-04 15:30:50 +01:00
ucnid.h Update copyright years. 2016-01-04 15:30:50 +01:00
ucnid.tab Update copyright years. 2016-01-04 15:30:50 +01:00