+2016-08-17 David Malcolm <dmalcolm@redhat.com>
+
+ * input.c (get_source_range_for_char): Rename to...
+ (selftest::get_source_range_for_char): ...this, and move within
+ the #if CHECKING_P guard.
+ (get_num_source_ranges_for_substring): Rename to...
+ (selftest::get_num_source_ranges_for_substring): ...this, move
+ within the #if CHECKING_P guard, and make static.
+ (selftest::assert_num_substring_ranges): Initialize
+ actual_num_ranges.
+
2016-08-18 Alan Modra <amodra@gmail.com>
PR rtl-optimization/72771
return NULL;
}
+#if CHECKING_P
+
+namespace selftest {
+
+/* Selftests of location handling. */
+
/* Attempt to populate *OUT_RANGE with source location information on the
given character within the string literal found at STRLOC.
CHAR_IDX refers to an offset within the execution character set.
/* As get_source_range_for_char, but write to *OUT the number
of ranges that are available. */
-const char *
+static const char *
get_num_source_ranges_for_substring (cpp_reader *pfile,
string_concat_db *concats,
location_t strloc,
return NULL;
}
-#if CHECKING_P
-
-namespace selftest {
-
/* Selftests of location handling. */
/* Helper function for verifying location data: when location_t
cpp_reader *pfile = test.m_parser;
string_concat_db *concats = &test.m_concats;
- int actual_num_ranges;
+ int actual_num_ranges = -1;
const char *err
= get_num_source_ranges_for_substring (pfile, concats, strloc, type,
&actual_num_ranges);