[all-commits] [llvm/llvm-project] 72f0ed: [libc++] Remove unnecessary main() function in .co...

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Mar 17 14:56:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 72f0edf3f4291d2614719a8c8af21a7a62ed5d74
      https://github.com/llvm/llvm-project/commit/72f0edf3f4291d2614719a8c8af21a7a62ed5d74
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-03-17 (Fri, 17 Mar 2023)

  Changed paths:
    M libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp
    M libcxx/test/libcxx/atomics/bit-int.verify.cpp
    M libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
    M libcxx/test/libcxx/containers/associative/non_const_comparator.incomplete.verify.cpp
    M libcxx/test/libcxx/containers/associative/non_const_comparator.verify.cpp
    M libcxx/test/libcxx/containers/unord/non_const_comparator.incomplete.verify.cpp
    M libcxx/test/libcxx/containers/unord/non_const_comparator.verify.cpp
    M libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp
    M libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp
    M libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp
    M libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp
    M libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp
    M libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
    M libcxx/test/libcxx/diagnostics/nodiscard_extensions.compile.pass.cpp
    M libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
    M libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.cons/ctor.iter.explicit.verify.cpp
    M libcxx/test/libcxx/iterators/predef.iterators/reverse.iterators/bad_template_argument.verify.cpp
    M libcxx/test/libcxx/language.support/support.dynamic/aligned_alloc_availability.verify.cpp
    M libcxx/test/libcxx/numerics/rand/rand.device/has-no-random-device.verify.cpp
    M libcxx/test/libcxx/ranges/version.compile.pass.cpp
    M libcxx/test/libcxx/selftest/verify.cpp/no-werror.verify.cpp
    M libcxx/test/libcxx/thread/atomic.availability.verify.cpp
    M libcxx/test/libcxx/thread/barrier.availability.verify.cpp
    M libcxx/test/libcxx/thread/latch.availability.verify.cpp
    M libcxx/test/libcxx/thread/semaphore.availability.verify.cpp
    M libcxx/test/libcxx/thread/thread.barrier/version.compile.pass.cpp
    M libcxx/test/libcxx/thread/thread.latch/version.compile.pass.cpp
    M libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp
    M libcxx/test/libcxx/thread/thread.semaphore/version.compile.pass.cpp
    M libcxx/test/libcxx/utilities/format/version.compile.pass.cpp
    M libcxx/test/std/atomics/atomics.types.generic/standard_layout.compile.pass.cpp
    M libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/copy.assign.ptr.volatile.verify.cpp
    M libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/copy.assign.volatile.verify.cpp
    M libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.lang/concept.constructible/constructible_from.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.lang/concept.copyconstructible/copy_constructible.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp
    M libcxx/test/std/concepts/concepts.lang/concept.destructible/destructible.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.lang/concept.moveconstructible/move_constructible.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.object/copyable.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.object/movable.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.object/regular.compile.pass.cpp
    M libcxx/test/std/concepts/concepts.object/semiregular.compile.pass.cpp
    M libcxx/test/std/containers/associative/map/map.access/empty.verify.cpp
    M libcxx/test/std/containers/associative/multimap/empty.verify.cpp
    M libcxx/test/std/containers/associative/multiset/empty.verify.cpp
    M libcxx/test/std/containers/associative/set/empty.verify.cpp
    M libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.verify.cpp
    M libcxx/test/std/containers/container.adaptors/queue/queue.defn/empty.verify.cpp
    M libcxx/test/std/containers/container.adaptors/stack/stack.defn/empty.verify.cpp
    M libcxx/test/std/containers/sequences/array/empty.verify.cpp
    M libcxx/test/std/containers/sequences/deque/deque.capacity/empty.verify.cpp
    M libcxx/test/std/containers/sequences/forwardlist/empty.verify.cpp
    M libcxx/test/std/containers/sequences/list/list.capacity/empty.verify.cpp
    M libcxx/test/std/containers/sequences/vector.bool/empty.verify.cpp
    M libcxx/test/std/containers/sequences/vector/vector.capacity/empty.verify.cpp
    M libcxx/test/std/containers/sequences/vector/vector.cons/copy.move_only.verify.cpp
    M libcxx/test/std/containers/unord/unord.map/empty.verify.cpp
    M libcxx/test/std/containers/unord/unord.multimap/empty.verify.cpp
    M libcxx/test/std/containers/unord/unord.multiset/empty.verify.cpp
    M libcxx/test/std/containers/unord/unord.set/empty.verify.cpp
    M libcxx/test/std/containers/views/views.span/span.cons/iterator_len.verify.cpp
    M libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.verify.cpp
    M libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp
    M libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp
    M libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp
    M libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp
    M libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp
    M libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.verify.cpp
    M libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.verify.cpp
    M libcxx/test/std/iterators/iterator.container/empty.array.verify.cpp
    M libcxx/test/std/iterators/iterator.container/empty.container.verify.cpp
    M libcxx/test/std/iterators/iterator.container/empty.initializer_list.verify.cpp
    M libcxx/test/std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_move.nodiscard.verify.cpp
    M libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/ctor.iter.explicit.verify.cpp
    M libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.ref/deprecated.verify.cpp
    M libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cons/ctor.iter.explicit.verify.cpp
    M libcxx/test/std/language.support/cmp/cmp.categories.pre/zero_type.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_nothrow.verify.cpp
    M libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.verify.cpp
    M libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/codecvt_byname_char16_t_char.depr_in_cxx20.verify.cpp
    M libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/codecvt_byname_char32_t_char.depr_in_cxx20.verify.cpp
    M libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/codecvt_char16_t_char.depr_in_cxx20.verify.cpp
    M libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/codecvt_char32_t_char.depr_in_cxx20.verify.cpp
    M libcxx/test/std/numerics/numbers/illformed.verify.cpp
    M libcxx/test/std/numerics/rand/rand.req/rand.req.urng/uniform_random_bit_generator.compile.pass.cpp
    M libcxx/test/std/re/re.results/re.results.size/empty.verify.cpp
    M libcxx/test/std/strings/basic.string/string.capacity/empty.verify.cpp
    M libcxx/test/std/strings/basic.string/string.capacity/reserve.deprecated_in_cxx20.verify.cpp
    M libcxx/test/std/strings/string.view/string.view.capacity/empty.verify.cpp
    M libcxx/test/std/thread/futures/futures.async/async.verify.cpp
    M libcxx/test/std/thread/futures/futures.promise/copy_assign.verify.cpp
    M libcxx/test/std/thread/futures/futures.promise/copy_ctor.verify.cpp
    M libcxx/test/std/thread/futures/futures.unique_future/copy_assign.verify.cpp
    M libcxx/test/std/thread/futures/futures.unique_future/copy_ctor.verify.cpp
    M libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.verify.cpp
    M libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.verify.cpp
    M libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.verify.cpp
    M libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.verify.cpp
    M libcxx/test/std/utilities/format/format.arguments/format.args/types.compile.pass.cpp
    M libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.verify.cpp
    M libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.verify.cpp
    M libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp
    M libcxx/test/std/utilities/function.objects/func.bind_front/bind_front.verify.cpp
    M libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.verify.cpp
    M libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.verify.cpp
    M libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.verify.cpp
    M libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.verify.cpp
    M libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_rfunction.verify.cpp
    M libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.verify.cpp
    M libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp
    M libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp
    M libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp
    M libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp
    M libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/allocate.verify.cpp
    M libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.constexpr.size.verify.cpp
    M libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.verify.cpp
    M libcxx/test/std/utilities/memory/default.allocator/allocator_types.deprecated_in_cxx17.verify.cpp
    M libcxx/test/std/utilities/memory/default.allocator/allocator_types.removed_in_cxx20.verify.cpp
    M libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_reference.compile.pass.cpp
    M libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.verify.cpp
    M libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_arrow.verify.cpp
    M libcxx/test/std/utilities/utility/utility.underlying/to_underlying.verify.cpp
    M libcxx/test/support/test.support/test_macros_header.no_exceptions.verify.cpp
    M libcxx/test/support/test.support/test_macros_header.no_rtti.verify.cpp

  Log Message:
  -----------
  [libc++] Remove unnecessary main() function in .compile.pass.cpp and .verify.cpp tests

We pretty consistently don't define those cause they are not needed,
and it removes the potential pitfall to think that these tests are
being run. This doesn't touch .compile.fail.cpp tests since those
should be replaced by .verify.cpp tests anyway, and there would be
a lot to fix up.

As a fly-by, I also fixed a bit of formatting, removed a few unused
includes and made some very minor, clearly NFC refactorings such as
in allocator.traits/allocator.traits.members/allocate.verify.cpp where
the old test basically made no sense the way it was written.

Differential Revision: https://reviews.llvm.org/D146236




More information about the All-commits mailing list