Commit d672cded by David Malcolm Committed by David Malcolm

line-map.h: add source_range::from_locations

libcpp/ChangeLog:
	* include/line-map.h (source_range::from_locations): New method.

From-SVN: r239711
parent 0da825e9
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;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment