]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tweak get_source_text_between comment devel/c++-contracts
authorJason Merrill <jason@redhat.com>
Fri, 4 Nov 2022 17:05:06 +0000 (13:05 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 4 Nov 2022 17:05:06 +0000 (13:05 -0400)
gcc/input.cc

index 04d0809bfdf4741f124b3aea985be296afb5277c..c185bd74c1f37527c97518565a48bcba63a20dc5 100644 (file)
@@ -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)