Ignore:
Timestamp:
Jan 7, 2021, 3:27:00 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
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.
Message:

Merge branch 'master' into park_unpark

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/CodeLocation.h

    r3c64c668 r58fe85a  
    4242        }
    4343
    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 {
    4556                return (first_line + seperation == other.first_line &&
    4657                        filename == other.filename);
    4758        }
    4859
    49         bool operator==( CodeLocation const & other ) {
     60        bool operator==( CodeLocation const & other ) const {
    5061                return followedBy( other, 0 );
    5162        }
    5263
    53         bool operator!=( CodeLocation const & other ) {
     64        bool operator!=( CodeLocation const & other ) const {
    5465                return !(*this == other);
    5566        }
Note: See TracChangeset for help on using the changeset viewer.