diff --git a/src/SourceRange.cc b/src/SourceRange.cc index 8bd8579..05d237e 100644 --- a/src/SourceRange.cc +++ b/src/SourceRange.cc @@ -1,6 +1,6 @@ #include "SourceRange.h" -clangmm::SourceRange::SourceRange(clangmm::SourceLocation &start, clangmm::SourceLocation &end) { +clangmm::SourceRange::SourceRange(const clangmm::SourceLocation &start, const clangmm::SourceLocation &end) { cx_range = clang_getRange(start.cx_location, end.cx_location); } diff --git a/src/SourceRange.h b/src/SourceRange.h index cb8e90d..0533362 100644 --- a/src/SourceRange.h +++ b/src/SourceRange.h @@ -9,7 +9,7 @@ namespace clangmm { class SourceRange { public: SourceRange(const CXSourceRange& cx_range) : cx_range(cx_range) {} - SourceRange(SourceLocation &start, SourceLocation &end); + SourceRange(const SourceLocation &start, const SourceLocation &end); SourceLocation get_start() const; SourceLocation get_end() const; std::pair get_offsets() const;