[NFC][ADT] Tweaked some functions in StringRef
Reduced the usage of variables in the `rfind` and `count` functions. Replaced calls to `drop_front` with direct use of `substr` in `consume_front`, since `starts_with` already performs length check on the string. Did the same for other functions. Using the `std::clamp` in `slice` makes the code more straightforward. Reviewed By: bkramer Differential Revision: https://reviews.llvm.org/D144787
Loading
Please sign in to comment