[llvm] [llvm][Support] fix convertToSnakeFromCamelCase (PR #68375)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 6 08:24:10 PDT 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 2e26d091060e87629f23163433b5e2fd450b54bf d9a6b83d3650baecd70326e33fe6518e18fa34ff -- llvm/lib/Support/StringExtras.cpp llvm/unittests/ADT/StringExtrasTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Support/StringExtras.cpp b/llvm/lib/Support/StringExtras.cpp
index 019ba266afe6..fd5a34fb3d6e 100644
--- a/llvm/lib/Support/StringExtras.cpp
+++ b/llvm/lib/Support/StringExtras.cpp
@@ -97,7 +97,6 @@ std::string llvm::convertToSnakeFromCamelCase(StringRef input) {
if (input.empty())
return "";
-
std::string snakeCase = input.str();
for (int i = 0; i < 10; ++i) {
snakeCase = llvm::Regex("([A-Z]+)([A-Z][a-z])").sub("\\1_\\2", snakeCase);
``````````
</details>
https://github.com/llvm/llvm-project/pull/68375
More information about the llvm-commits
mailing list