Skip to content

Commit 4026534

Browse files
committed
amend! [libc++] Add default copy ctor to "__chrono/exception.h"
Add required attributes to fix test failures [libc++] Add default copy ctor to "__chrono/exception.h" After PR#90394, "__chrono/exception.h" will trigger "deprecated-copy-with-user-provided-dtor" warning on Windows x64 runtime testing with ToT Clang. This patch addresses this issue by explicitly adding those default copy ctors.
1 parent 9cc1df4 commit 4026534

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libcxx/include/__chrono/exception.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class nonexistent_local_time : public runtime_error {
4848
"creating an nonexistent_local_time from a local_info that is not non-existent");
4949
}
5050

51-
nonexistent_local_time(const nonexistent_local_time&) = default;
52-
nonexistent_local_time& operator=(const nonexistent_local_time&) = default;
51+
_LIBCPP_HIDE_FROM_ABI nonexistent_local_time(const nonexistent_local_time&) = default;
52+
_LIBCPP_HIDE_FROM_ABI nonexistent_local_time& operator=(const nonexistent_local_time&) = default;
5353

5454
_LIBCPP_AVAILABILITY_TZDB _LIBCPP_EXPORTED_FROM_ABI ~nonexistent_local_time() override; // exported as key function
5555

@@ -92,8 +92,8 @@ class ambiguous_local_time : public runtime_error {
9292
"creating an ambiguous_local_time from a local_info that is not ambiguous");
9393
}
9494

95-
ambiguous_local_time(const ambiguous_local_time&) = default;
96-
ambiguous_local_time& operator=(const ambiguous_local_time&) = default;
95+
_LIBCPP_HIDE_FROM_ABI ambiguous_local_time(const ambiguous_local_time&) = default;
96+
_LIBCPP_HIDE_FROM_ABI ambiguous_local_time& operator=(const ambiguous_local_time&) = default;
9797

9898
_LIBCPP_AVAILABILITY_TZDB _LIBCPP_EXPORTED_FROM_ABI ~ambiguous_local_time() override; // exported as key function
9999

0 commit comments

Comments
 (0)