[libcxx-commits] [libcxx] [libc++] Add some _LIBCPP_ASSUMEs for bounded iterators (PR #109033)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 17 12:32:52 PDT 2024
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 c532e6db274d4edeb65e9436d44e33f0ccc1cb83 f52709698e32ad21c0124281bfc6e49cc008b5ac --extensions ,h -- libcxx/include/__assert libcxx/include/__iterator/bounded_iter.h libcxx/include/vector
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__iterator/bounded_iter.h b/libcxx/include/__iterator/bounded_iter.h
index bc0a4d0bc5..6e74edec9c 100644
--- a/libcxx/include/__iterator/bounded_iter.h
+++ b/libcxx/include/__iterator/bounded_iter.h
@@ -102,7 +102,7 @@ private:
// may be wrapped type, such that `operator<=` has side effects.
pointer __begin_ptr = std::__to_address(__begin);
pointer __current_ptr = std::__to_address(__current);
- pointer __end_ptr = std::__to_address(__end);
+ pointer __end_ptr = std::__to_address(__end);
_LIBCPP_ASSUME(__begin_ptr <= __current_ptr);
_LIBCPP_ASSUME(__current_ptr <= __end_ptr);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/109033
More information about the libcxx-commits
mailing list