Delete the default Token assignment opoerator Recent Clang issues a warning for this: warning: definition of implicit copy assignment operator for 'Token' is deprecated because it has a user-declared copy constructor Change-Id: I61345d30ff50fd51c587d1a6fbebd777ae3cbd60 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/6760 Commit-Queue: Petr Hosek <phosek@google.com> Reviewed-by: Brett Wilson <brettw@chromium.org>
diff --git a/src/gn/token.cc b/src/gn/token.cc index c648371..0466ce7 100644 --- a/src/gn/token.cc +++ b/src/gn/token.cc
@@ -11,8 +11,6 @@ Token::Token(const Location& location, Type t, const std::string_view& v) : type_(t), value_(v), location_(location) {} -Token::Token(const Token& other) = default; - bool Token::IsIdentifierEqualTo(const char* v) const { return type_ == IDENTIFIER && value_ == v; }
diff --git a/src/gn/token.h b/src/gn/token.h index 8837466..c074620 100644 --- a/src/gn/token.h +++ b/src/gn/token.h
@@ -59,7 +59,6 @@ Token(); Token(const Location& location, Type t, const std::string_view& v); - Token(const Token& other); Type type() const { return type_; } const std::string_view& value() const { return value_; }