[Openmp-commits] [openmp] [libomp] Add kmp_str_ref (ADT 1/2) (PR #176162)
via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 28 07:14:50 PST 2026
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 origin/main HEAD --extensions cpp,h -- openmp/runtime/src/kmp_adt.h openmp/runtime/unittests/ADT/TestStringRef.cpp openmp/runtime/src/kmp_str.cpp openmp/runtime/src/kmp_str.h openmp/runtime/unittests/String/TestKmpStr.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/openmp/runtime/src/kmp_adt.h b/openmp/runtime/src/kmp_adt.h
index 120a06709..8ecff04ff 100644
--- a/openmp/runtime/src/kmp_adt.h
+++ b/openmp/runtime/src/kmp_adt.h
@@ -98,9 +98,7 @@ public:
// Drop the first n characters from the string.
// (Limit n to the length of the string.)
- void drop_front(size_t n) {
- sv.remove_prefix(std::min(n, length()));
- }
+ void drop_front(size_t n) { sv.remove_prefix(std::min(n, length())); }
// Drop characters from the string while the predicate returns true.
void drop_while(bool (*predicate)(char)) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/176162
More information about the Openmp-commits
mailing list