You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

11 lines
402 B

#include "SourceRange.h"
clang::SourceRange::
SourceRange(clang::SourceLocation &start, clang::SourceLocation &end) {
cx_range = clang_getRange(start.cx_location, end.cx_location);
}
std::pair<clang::Offset, clang::Offset> clang::SourceRange::get_offsets() {
SourceLocation start(clang_getRangeStart(cx_range)), end(clang_getRangeEnd(cx_range));
return {start.get_offset(), end.get_offset()};
}