[llvm] [ADT][NFC] Make `getAutoSenseRadix` in `StringRef` global (PR #152503)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 7 08:09:34 PDT 2025
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 HEAD~1 HEAD --extensions cpp,h -- llvm/include/llvm/ADT/StringRef.h llvm/lib/Support/StringRef.cpp llvm/unittests/ADT/StringRefTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/unittests/ADT/StringRefTest.cpp b/llvm/unittests/ADT/StringRefTest.cpp
index f85bb0a4e..ec7c7f5d0 100644
--- a/llvm/unittests/ADT/StringRefTest.cpp
+++ b/llvm/unittests/ADT/StringRefTest.cpp
@@ -622,17 +622,8 @@ TEST(StringRefTest, Hashing) {
struct RadixPair {
const char *Str;
unsigned Expected;
-} RadixNumbers[] =
- { {"123", 10}
- , {"1", 10}
- , {"0b1", 2}
- , {"01", 8}
- , {"0o1", 8}
- , {"0x1", 16}
- , {"0", 10}
- , {"00", 8}
- , {"", 10}
- };
+} RadixNumbers[] = {{"123", 10}, {"1", 10}, {"0b1", 2}, {"01", 8}, {"0o1", 8},
+ {"0x1", 16}, {"0", 10}, {"00", 8}, {"", 10}};
TEST(StringRefTest, getAutoSenseRadix) {
for (size_t i = 0; i < std::size(RadixNumbers); ++i) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/152503
More information about the llvm-commits
mailing list