Changeset 58fe85a for src/Common/CodeLocation.h
- Timestamp:
- Jan 7, 2021, 3:27:00 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2b4daf2, 64aeca0
- Parents:
- 3c64c668 (diff), eef8dfb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/CodeLocation.h
r3c64c668 r58fe85a 42 42 } 43 43 44 bool followedBy( CodeLocation const & other, int seperation ) { 44 bool startsBefore( CodeLocation const & other ) const { 45 if( filename < other.filename ) return true; 46 if( filename > other.filename ) return false; 47 48 if( first_line < other.first_line ) return true; 49 if( first_line > other.first_line ) return false; 50 51 if( last_line < other.last_line ) return true; 52 return false; 53 } 54 55 bool followedBy( CodeLocation const & other, int seperation ) const { 45 56 return (first_line + seperation == other.first_line && 46 57 filename == other.filename); 47 58 } 48 59 49 bool operator==( CodeLocation const & other ) {60 bool operator==( CodeLocation const & other ) const { 50 61 return followedBy( other, 0 ); 51 62 } 52 63 53 bool operator!=( CodeLocation const & other ) {64 bool operator!=( CodeLocation const & other ) const { 54 65 return !(*this == other); 55 66 }
Note:
See TracChangeset
for help on using the changeset viewer.