line-map.h: add source_range::from_locations
libcpp/ChangeLog: * include/line-map.h (source_range::from_locations): New method. From-SVN: r239711
This commit is contained in:
parent
0da825e962
commit
d672cded1f
2 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2016-08-23 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
* include/line-map.h (source_range::from_locations): New method.
|
||||
|
||||
2016-08-19 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
* include/line-map.h (fixit_hint::kind): Delete REPLACE.
|
||||
|
|
|
@ -296,6 +296,16 @@ struct GTY(()) source_range
|
|||
return result;
|
||||
}
|
||||
|
||||
/* Make a source_range from a pair of source_location. */
|
||||
static source_range from_locations (source_location start,
|
||||
source_location finish)
|
||||
{
|
||||
source_range result;
|
||||
result.m_start = start;
|
||||
result.m_finish = finish;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Is there any part of this range on the given line? */
|
||||
bool intersects_line_p (const char *file, int line) const;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue