-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace usage of StringRef::find_last_of with a string literal of siz…
…e one by the equivalent char literal
- Loading branch information
1 parent
2060bfc
commit 33b5158
Showing
4 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33b5158
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could reduce the chance of this failure, or make it not a problem by adding an array ref overload (though there's man yof these functions to add such defenses to) of length 1 (I guess it could assert than the 1 character isn't null - can't think of a reason you'd want to find_last_of... nothing? I guess some caller might do something quirky and expect find_last_of("") to successfully fail to find anything)? Probably not worth it, but just a thought.
33b5158
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
33b5158
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good stuff (is there now a nice way to integrate clang-tidy into the developer workflow? and/or running these as part of precommit checks, etc?)