Get mapped offset for rewritten text


I need to get mapped offset for rewritten text to use it in
Rewriter::RemoveText(SourceRange range, RewriteOptions opts=RewriteOptions())
because that method calculates only mapped offset for end of range (not for
begin of range). Rewriter also has functions getRangeSize(...) and getRewrittenText(...)
which can calculate mapped offsets. Maybe Rewriter needs getMappedRange(...) function?
How can I get mapped offset for begin of range?

I found patch (
with public Rewriter::getMappedOffset(...), but it isn't in master tree of clang.