diff options
-rw-r--r-- | libcpp/ChangeLog | 7 | ||||
-rw-r--r-- | libcpp/line-map.c | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 9b296fd..09b8e18 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,10 @@ +2015-12-22 David Malcolm <dmalcolm@redhat.com> + + * line-map.c (get_combined_adhoc_loc): Remove condition + on locus < RESERVED_LOCATION_COUNT when considering + whether a caret == start == finish location can be + simply stored as the caret location. + 2015-12-07 David Malcolm <dmalcolm@redhat.com> * include/line-map.h (rich_location::set_range): Add line_maps * diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 209d0fb..c20a32b 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -196,10 +196,9 @@ get_combined_adhoc_loc (struct line_maps *set, } } - /* We can also compactly store the reserved locations + /* We can also compactly store locations when locus == start == finish (and data is NULL). */ - if (locus < RESERVED_LOCATION_COUNT - && locus == src_range.m_start + if (locus == src_range.m_start && locus == src_range.m_finish && !data) return locus; |