Commit 736112b7 authored by Florian Jung's avatar Florian Jung
Browse files

Added comparison ops >, <=, >= to SourceLocation

parent 997d02a8
......@@ -10,6 +10,9 @@ namespace clangmm {
bool operator==(const Offset &o) const {return line==o.line && index==o.index;}
bool operator!=(const Offset &o) const {return !(*this==o);}
bool operator<(const Offset &o) const {return line<o.line || (line==o.line && index<o.index);}
bool operator>(const Offset &o) const {return o < *this;}
bool operator<=(const Offset &o) const {return (*this == o) || (*this < o);}
bool operator>=(const Offset &o) const {return (*this == o) || (*this > o);}
unsigned line;
unsigned index; //byte index in line (not char number)
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