[libcxx-commits] [libcxx] [libc++] Add MSVC's implementation of `exception_ptr` for Windows (PR #94977)

Petr Hosek via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 18 22:20:11 PDT 2026


petrhosek wrote:

> log: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8676372941358177969/+/u/compile__with_patch_/stdout?format=raw
> 
> (look for "failed:")
> 
> It uses clang-cl.
> 
> Failing build command:
> 
> ```
> [8311/117871] 28.00s E CXX obj/buildtools/third_party/libc++/libc++/exception.obj	
> FAILED: 8bf031e0-eb2f-4d4d-8441-0f3c69035378 "./obj/buildtools/third_party/libc++/libc++/exception.obj" CXX obj/buildtools/third_party/libc++/libc++/exception.obj
> err: exit=1
> ..\..\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe /c ../../third_party/libc++/src/src/exception.cpp /Foobj/buildtools/third_party/libc++/libc++/exception.obj /nologo /showIncludes:user /winsysroot../../third_party/depot_tools/win_toolchain/vs_files/e66617bc68 "-DCR_CLANG_REVISION=\"llvmorg-23-init-19482-g53d18800-1\"" -DCOMPONENT_BUILD -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D_LIBCPP_INSTRUMENTED_WITH_ASAN=0 -DCR_LIBCXX_REVISION=9d57af17811b286bda053a9887db849e6ab21482 -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DDCHECK_ALWAYS_ON=1 -DUSE_AURA=1 -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DWINCRYPT_USE_SYMBOL_PREFIX -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNTDDI_VERSION=NTDDI_WIN7 -D_WIN32_WINNT=_WIN32_WINNT_WIN7 -DWINVER=_WIN32_WINNT_WIN7 -D_LIBCPP_BUILDING_LIBRARY -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -DLIBC_NAMESPACE=__llvm_libc_cr -I../../third_party/libc++/src/src -I../.. -Igen -I../../buildtools/third_party/libc++ -I../../third_party/llvm-libc/src -fno-delete-null-pointer-checks /clang:-fno-strict-overflow -fno-ident /clang:-fno-math-errno -fcolor-diagnostics /clang:-fdiagnostics-show-inlining-chain -fmerge-all-constants -fcrash-diagnostics-dir=../clang-crashreports -fno-lifetime-dse -mllvm -instcombine-lower-dbg-declare=0 -mllvm -split-threshold-for-reg-with-hint=0 /clang:-ffp-contract=off -fcomplete-member-pointers /Gy /FS /bigobj /utf-8 /Zc:twoPhase -ffile-reproducible /D__WRL_ENABLE_FUNCTION_STATICS__ -fmsc-version=1934 /Zc:dllexportInlines- -m32 -msse3 /Brepro -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. -no-canonical-prefixes --warning-suppression-mappings=../../build/config/warning_suppression.txt -ftrivial-auto-var-init=pattern /Od /Ob0 /GF -fsanitize=array-bounds -fsanitize-trap=array-bounds -fsanitize-ignore-for-ubsan-feature=array-bounds -Wno-unsafe-buffer-usage-in-static-sized-array -fsanitize=return -fsanitize-trap=return -fsanitize-ignore-for-ubsan-feature=return /guard:cf,nochecks /MDd -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-stack-allocated -Xclang -plugin-arg-find-bad-constructs -Xclang relax-ctor-checks-for-aggregates -Xclang -add-plugin -Xclang raw-ptr-plugin -Xclang -plugin-arg-raw-ptr-plugin -Xclang check-raw-ptr-to-stack-allocated -Xclang -plugin-arg-raw-ptr-plugin -Xclang disable-check-raw-ptr-to-stack-allocated-error -Xclang -plugin-arg-raw-ptr-plugin -Xclang raw-ptr-exclude-path=../../third_party/dawn/ -Xclang -plugin-arg-raw-ptr-plugin -Xclang raw-ptr-exclude-path=../../build/config/clang/chrome/test/fuzzing/webidl_fuzzing/ -Xclang -plugin-arg-raw-ptr-plugin -Xclang check-raw-ptr-fields -Xclang -plugin-arg-raw-ptr-plugin -Xclang check-span-fields -Xclang -plugin-arg-raw-ptr-plugin -Xclang check-raw-ref-fields -Xclang -plugin-arg-raw-ptr-plugin -Xclang no-special-treatment-for-oilpanized-paths -DUNSAFE_BUFFERS_BUILD -Wunsafe-buffer-usage -Wno-error=unsafe-buffer-usage -Xclang -add-plugin -Xclang unsafe-buffers -Xclang -plugin-arg-unsafe-buffers -Xclang ../../build/config/unsafe_buffers_paths.txt -fstrict-aliasing -Wundef -Wno-pragma-clang-attribute -Wno-ignored-attributes -Wno-macro-redefined /W3 /wd4800 /wd4267 -Wno-unused-variable -Wno-unused-template -Wno-c++11-narrowing -Wno-unused-but-set-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wno-cast-function-type -Wno-thread-safety-reference-return -Wno-nontrivial-memcall -Wno-uninitialized-const-pointer -Wno-unused-but-set-global -Wno-nonportable-include-path -Wexit-time-destructors /WX -Wno-exit-time-destructors -Wno-exit-time-destructors /std:c++23preview -Wno-trigraphs -I../../third_party/libc++/src/include -std:c++latest -Wno-invalid-offsetof -Wenum-compare-conditional -Wno-nullability-completeness -Wunique-object-duplication /EHsc /GR /TP  "-fmodule-name=//buildtools/third_party/libc++:libc++_Private" /Fd"obj/buildtools/third_party/libc++/libc++_cc.pdb"
> build step: cxx "./obj/buildtools/third_party/libc++/libc++/exception.obj"
> siso_rule: clang-cl/cxx
> stderr:
> In file included from ../../third_party/libc++/src/src/exception.cpp:16:
> ../../third_party/libc++/src/src\support/runtime/exception_pointer_msvc.ipp(149,38): error: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Werror,-Wmicrosoft-cast]
>   149 |     __call_member_function_2(__dest, __copy_func, __adjusted, 1);
>       |                                      ^~~~~~~~~~~
> ../../third_party/libc++/src/src\support/runtime/exception_pointer_msvc.ipp(151,38): error: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Werror,-Wmicrosoft-cast]
>   151 |     __call_member_function_1(__dest, __copy_func, __adjusted);
>       |                                      ^~~~~~~~~~~
> ../../third_party/libc++/src/src\support/runtime/exception_pointer_msvc.ipp(207,77): error: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Werror,-Wmicrosoft-cast]
>   207 |           __call_member_function_0(__cpp_eh_record.params.pExceptionObject, __throw_info->pmfnUnwind);
>       |                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~
> 3 errors generated.
> ```

https://github.com/llvm/llvm-project/pull/210570

https://github.com/llvm/llvm-project/pull/94977


More information about the libcxx-commits mailing list