Page MenuHomePhabricator

[libc++][NFC] Use noexcept instead of the macros where possible
Needs ReviewPublic

Authored by philnik on Aug 14 2022, 3:28 AM.

Details

Reviewers
ldionne
Mordante
var-const
Group Reviewers
Restricted Project

Diff Detail

Unit TestsFailed

TimeTest
1,500,470 mslibcxx CI MacOS arm64 > llvm-libc++-shared-cfg-in.std/algorithms/alg_modifying_operations/alg_transform::ranges.transform.pass.cpp
Script: -- : 'COMPILED WITH'; /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ /Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/static-162-255-21-37-macminivault-com/llvm-project/libcxx-ci/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.pass.cpp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk --target=arm64-apple-darwin21.4.0 -nostdinc++ -I /Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/static-162-255-21-37-macminivault-com/llvm-project/libcxx-ci/build/generic-cxx20/include/c++/v1 -I /Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/static-162-255-21-37-macminivault-com/llvm-project/libcxx-ci/build/generic-cxx20/include/c++/v1 -I /Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/static-162-255-21-37-macminivault-com/llvm-project/libcxx-ci/libcxx/test/support -std=c++20 -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-noexcept-type -Wno-atomic-alignment -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -lc++experimental -nostdlib++ -L /Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/static-162-255-21-37-macminivault-com/llvm-project/libcxx-ci/build/generic-cxx20/lib -Wl,-rpath,/Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/static-162-255-21-37-macminivault-com/llvm-project/libcxx-ci/build/generic-cxx20/lib -lc++ -pthread -o /Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/static-162-255-21-37-macminivault-com/llvm-project/libcxx-ci/build/generic-cxx20/test/std/algorithms/alg.modifying.operations/alg.transform/Output/ranges.transform.pass.cpp.dir/t.tmp.

Event Timeline

philnik created this revision.Aug 14 2022, 3:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2022, 3:28 AM
philnik requested review of this revision.Aug 14 2022, 3:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2022, 3:28 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

I'm not really convinced this patch is really worth the effort, but no real objections.

libcxx/include/__algorithm/iter_swap.h
25

This is correct, but I find it confusion. In this case I would really prefer to use the macro twice.

I see we already use this in some places, but to me this change isn't an improvement.

libcxx/include/__memory/shared_ptr.h
1764

How did you detect these places to adjust? It seems there are more places.

libcxx/include/string
1745

This one can be changed too.