[libcxx-commits] [libcxx] Non-constant instances have been made constant in data_const.pass.cpp (PR #122085)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 8 02:17:17 PST 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 32bc029be6265838833623fdd88cc665d5658dc7 5ef53b1c3532a5378372b31d406f4775685237e0 --extensions cpp -- libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp
index 05afe01600..71f1dbb77d 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp
@@ -39,9 +39,9 @@ TEST_CONSTEXPR_CXX20 bool tests()
assert(is_contiguous_container_asan_correct(v));
}
{
- const std::vector<Nasty> v(100);
- assert(v.data() == std::addressof(v.front()));
- assert(is_contiguous_container_asan_correct(v));
+ const std::vector<Nasty> v(100);
+ assert(v.data() == std::addressof(v.front()));
+ assert(is_contiguous_container_asan_correct(v));
}
#if TEST_STD_VER >= 11
{
@@ -55,24 +55,24 @@ TEST_CONSTEXPR_CXX20 bool tests()
assert(is_contiguous_container_asan_correct(v));
}
{
- const std::vector<Nasty, min_allocator<Nasty>> v(100);
- assert(v.data() == std::addressof(v.front()));
- assert(is_contiguous_container_asan_correct(v));
+ const std::vector<Nasty, min_allocator<Nasty>> v(100);
+ assert(v.data() == std::addressof(v.front()));
+ assert(is_contiguous_container_asan_correct(v));
}
{
- const std::vector<int, safe_allocator<int>> v;
- assert(v.data() == 0);
- assert(is_contiguous_container_asan_correct(v));
+ const std::vector<int, safe_allocator<int>> v;
+ assert(v.data() == 0);
+ assert(is_contiguous_container_asan_correct(v));
}
{
- const std::vector<int, safe_allocator<int>> v(100);
- assert(v.data() == &v.front());
- assert(is_contiguous_container_asan_correct(v));
+ const std::vector<int, safe_allocator<int>> v(100);
+ assert(v.data() == &v.front());
+ assert(is_contiguous_container_asan_correct(v));
}
{
- const std::vector<Nasty, safe_allocator<Nasty>> v(100);
- assert(v.data() == std::addressof(v.front()));
- assert(is_contiguous_container_asan_correct(v));
+ const std::vector<Nasty, safe_allocator<Nasty>> v(100);
+ assert(v.data() == std::addressof(v.front()));
+ assert(is_contiguous_container_asan_correct(v));
}
#endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/122085
More information about the libcxx-commits
mailing list