[llvm] [llvm][Support] fix convertToSnakeFromCamelCase (PR #68375)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 6 13:29:42 PDT 2023
================
@@ -98,16 +98,18 @@ std::string llvm::convertToSnakeFromCamelCase(StringRef input) {
std::string snakeCase;
snakeCase.reserve(input.size());
- for (char c : input) {
- if (!std::isupper(c)) {
- snakeCase.push_back(c);
- continue;
- }
-
- if (!snakeCase.empty() && snakeCase.back() != '_')
+ auto check = [&input](size_t j, std::function<bool(int)> check) {
----------------
rkayaith wrote:
nit
```suggestion
auto check = [&input](size_t j, function_ref<bool(int)> check) {
```
https://github.com/llvm/llvm-project/pull/68375
More information about the llvm-commits
mailing list