From: Jason Merrill Date: Fri, 4 Nov 2022 17:05:06 +0000 (-0400) Subject: tweak get_source_text_between comment X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fdevel%2Fc%2B%2B-contracts;p=thirdparty%2Fgcc.git tweak get_source_text_between comment --- diff --git a/gcc/input.cc b/gcc/input.cc index 04d0809bfdf4..c185bd74c1f3 100644 --- a/gcc/input.cc +++ b/gcc/input.cc @@ -949,8 +949,9 @@ location_get_source_line (const char *file_path, int line) return char_span (buffer, len); } -/* Return a copy of the source text between two locations. The caller is - responsible for freeing the return value. */ +/* Return a NUL-terminated copy of the source text between two locations, or + NULL if the arguments are invalid. The caller is responsible for freeing + the return value. */ char * get_source_text_between (location_t start, location_t end)