summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2022-11-04 13:05:06 -0400
committerJason Merrill <jason@redhat.com>2022-11-04 13:05:06 -0400
commitdf3709d167ccb86775b7aebb12bc6865fc814a9d (patch)
tree2049db0296a1de3c9b831c049e4a21f694967fe4
parenta01c9dfe60764a346ddd82d66d19488d5e9d7927 (diff)
downloadgcc-devel/c++-contracts.tar.gz
tweak get_source_text_between commentdevel/c++-contracts
-rw-r--r--gcc/input.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/input.cc b/gcc/input.cc
index 04d0809bfdf..c185bd74c1f 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)