mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rename ToString to mention Operator (#2539)
Naming this ToString within the Carbon namespace encourages incidental overloading of the function, and that doesn't seem to be intentional; this feels questionable [under overloading style](https://google.github.io/styleguide/cppguide.html#Function_Overloading). OperatorToString seems helpful in that it makes it easy to see at a glance where it's being used.
This commit is contained in:
@@ -253,7 +253,7 @@ auto Interpreter::EvalPrim(Operator op, Nonnull<const Value*> /*static_type*/,
|
||||
case Operator::BitShiftLeft:
|
||||
case Operator::BitShiftRight:
|
||||
case Operator::Complement:
|
||||
CARBON_FATAL() << "operator " << ToString(op)
|
||||
CARBON_FATAL() << "operator " << OperatorToString(op)
|
||||
<< " should always be rewritten";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user