#ifndef SOURCERANGE_H_ #define SOURCERANGE_H_ #include #include "source_location.h" #include #include namespace clangmm { class SourceRange { public: SourceRange(const CXSourceRange& cx_range) : cx_range(cx_range) {} SourceRange(const SourceLocation &start, const SourceLocation &end); SourceLocation get_start() const; SourceLocation get_end() const; std::pair get_offsets() const; friend std::ostream &operator<<(std::ostream &os, const SourceRange &range) { os << range.get_start() << '-' << range.get_end(); return os; } CXSourceRange cx_range; }; } // namespace clangmm #endif // SOURCERANGE_H_