[libcxx-commits] [libcxx] [libc++][test] Fix more MSVC and Clang warnings (PR #74965)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Dec 9 21:02:13 PST 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 b85f1f9b182234ba366d78ae2174a149e44d08c1 cca6d855bfbd53980d9449c9db970db8c96afd77 -- libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/buffered_reads.pass.cpp libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/buffered_writes.pass.cpp libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp libcxx/test/std/input.output/syncstream/syncbuf/syncstream.syncbuf.assign/swap.pass.cpp libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_align_nothrow.pass.cpp libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new.size_nothrow.pass.cpp libcxx/test/std/ranges/range.adaptors/range.elements/general.pass.cpp libcxx/test/std/ranges/range.adaptors/range.elements/iterator/deref.pass.cpp libcxx/test/std/ranges/range.adaptors/range.elements/iterator/member_types.compile.pass.cpp libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared_for_overwrite.pass.cpp libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.default_init.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/member_types.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/member_types.compile.pass.cpp
index 6fec655c67..70d49c1304 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/member_types.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.elements/iterator/member_types.compile.pass.cpp
@@ -64,9 +64,7 @@ static_assert(std::same_as<ElementsIter<Range<contiguous_iterator<std::tuple<int
static_assert(std::same_as<ElementsIter<Range<std::tuple<int>*>>::iterator_category, //
std::random_access_iterator_tag>);
-using Generator = decltype(std::views::iota(0, 1) | std::views::transform([](int) {
- return std::pair{1, short{1}};
- }));
+using Generator = decltype(std::views::iota(0, 1) | std::views::transform([](int) { return std::pair{1, short{1}}; }));
static_assert(std::ranges::random_access_range<Generator>);
static_assert(std::same_as<ElementsIter<Generator>::iterator_category, //
diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp
index 3ff8a87209..b6f60e6363 100644
--- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp
@@ -59,9 +59,7 @@ int main(int, char**)
{
meow(0);
}
- {
- ASSERT_SAME_TYPE(decltype(true ? purr() : 0), int);
- }
+ { ASSERT_SAME_TYPE(decltype(true ? purr() : 0), int); }
#if TEST_STD_VER > 14
{
int i = 0;
``````````
</details>
https://github.com/llvm/llvm-project/pull/74965
More information about the libcxx-commits
mailing list