| Index: tools/gn/location.h
|
| diff --git a/tools/gn/location.h b/tools/gn/location.h
|
| index 44d1a6fe68f614112bf1d57993cc8af8bb92755c..647c6f71227c2287a0099d3b2ccddabe86e0a008 100644
|
| --- a/tools/gn/location.h
|
| +++ b/tools/gn/location.h
|
| @@ -19,6 +19,7 @@ class Location {
|
| int line_number() const { return line_number_; }
|
| int column_number() const { return column_number_; }
|
| int byte() const { return byte_; }
|
| + bool is_null() const { return *this == Location(); }
|
|
|
| bool operator==(const Location& other) const;
|
| bool operator!=(const Location& other) const;
|
| @@ -45,6 +46,10 @@ class LocationRange {
|
|
|
| const Location& begin() const { return begin_; }
|
| const Location& end() const { return end_; }
|
| + bool is_null() const {
|
| + return begin_.is_null(); // No need to check both for the null case.
|
| + }
|
| +
|
|
|
| LocationRange Union(const LocationRange& other) const;
|
|
|
|
|