[libcxx-commits] [llvm] [libcxx] [libc++] Format the code base (PR #74334)

Petr Hosek via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 18 13:35:53 PST 2023


petrhosek wrote:

Looks like this broke the build of libc++ on Windows with the following error:
```
C:\b\s\w\ir\x\w\llvm_build\.\bin\clang-cl.exe --target=x86_64-pc-windows-msvc  /nologo -TP -DUNICODE -D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH -D_ALLOW_MSC_VER_MISMATCH -D_CRTBLD -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -D_GLIBCXX_ASSERTIONS -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS="" -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/src -IC:/b/s/w/ir/x/w/llvm_build/include/x86_64-pc-windows-msvc/c++/v1 -IC:/b/s/w/ir/x/w/llvm_build/include/c++/v1 /Zc:inline /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw -no-canonical-prefixes /Zi /O2 /Ob1  -std:c++latest -MT -UNDEBUG -W4 -Wextra -Wnewline-eof -Wshadow -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wunused-template -Wformat-nonliteral -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-compat -Wno-undef -Wno-reserved-id-macro -Wno-gnu-include-next -Wno-gcc-compat -Wno-zero-as-null-pointer-constant -Wno-deprecated-dynamic-exception-spec -Wno-sign-conversion -Wno-old-style-cast -Wno-deprecated -Wno-shift-sign-overflow -Wno-double-promotion -Wno-error -EHsc /showIncludes /Folibcxx/src/CMakeFiles/cxx_static.dir/support/win32/thread_win32.cpp.obj /Fdlibcxx\src\CMakeFiles\cxx_static.dir\cxx_static.pdb -c -- C:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/src/support/win32/thread_win32.cpp
In file included from C:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/src/support/win32/thread_win32.cpp:14:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\fibersapi.h:18:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h:182:
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(173,2): error: "No Target Architecture"
  173 | #error "No Target Architecture"
      |  ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(8906,5): error: unknown type name 'PCONTEXT'; did you mean '_CONTEXT'?
 8906 |     PCONTEXT ContextRecord;
      |     ^
C:\b\s\w\ir\cache\windows_sdk\VC\Tools\MSVC\14.34.31933\include\excpt.h(49,16): note: '_CONTEXT' declared here
   49 |         struct _CONTEXT;
      |                ^
In file included from C:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/src/support/win32/thread_win32.cpp:14:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\fibersapi.h:18:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h:182:
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(8906,14): error: field has incomplete type '_CONTEXT'
 8906 |     PCONTEXT ContextRecord;
      |              ^
C:\b\s\w\ir\cache\windows_sdk\VC\Tools\MSVC\14.34.31933\include\excpt.h(49,16): note: forward declaration of '_CONTEXT'
   49 |         struct _CONTEXT;
      |                ^
In file included from C:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/src/support/win32/thread_win32.cpp:14:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\fibersapi.h:18:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h:182:
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(19329,11): error: unknown type name 'PCONTEXT'; did you mean '_CONTEXT'?
 19329 |     _Out_ PCONTEXT ContextRecord
       |           ^
C:\b\s\w\ir\cache\windows_sdk\VC\Tools\MSVC\14.34.31933\include\excpt.h(49,16): note: '_CONTEXT' declared here
   49 |         struct _CONTEXT;
      |                ^
In file included from C:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/src/support/win32/thread_win32.cpp:14:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\fibersapi.h:18:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h:182:
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(19980,11): error: unknown type name 'PSLIST_HEADER'
 19980 |     _Out_ PSLIST_HEADER ListHead
       |           ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(19988,16): error: unknown type name 'SLIST_HEADER'
 19988 |     _In_ const SLIST_HEADER *ListHead
       |                ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(19995,13): error: unknown type name 'PSLIST_HEADER'
 19995 |     _Inout_ PSLIST_HEADER ListHead
       |             ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(20002,13): error: unknown type name 'PSLIST_HEADER'
 20002 |     _Inout_ PSLIST_HEADER ListHead,
       |             ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(20010,13): error: unknown type name 'PSLIST_HEADER'
 20010 |     _Inout_ PSLIST_HEADER ListHead,
       |             ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(20020,13): error: unknown type name 'PSLIST_HEADER'
 20020 |     _Inout_ PSLIST_HEADER ListHead
       |             ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winnt.h(20027,10): error: unknown type name 'PSLIST_HEADER'
 20027 |     _In_ PSLIST_HEADER ListHead
       |          ^
In file included from C:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/src/support/win32/thread_win32.cpp:16:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\windows.h:172:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winbase.h:35:
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\minwinbase.h(384,9): error: unknown type name 'PCONTEXT'; did you mean '_CONTEXT'?
  384 | typedef PCONTEXT LPCONTEXT;
      |         ^
C:\b\s\w\ir\cache\windows_sdk\VC\Tools\MSVC\14.34.31933\include\excpt.h(49,16): note: '_CONTEXT' declared here
   49 |         struct _CONTEXT;
      |                ^
In file included from C:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/src/support/win32/thread_win32.cpp:16:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\windows.h:172:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winbase.h:47:
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\errhandlingapi.h(214,14): error: unknown type name 'PCONTEXT'
  214 |     _In_opt_ PCONTEXT pContextRecord,
      |              ^
In file included from C:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/src/support/win32/thread_win32.cpp:16:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\windows.h:172:
In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\winbase.h:54:
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\interlockedapi.h(53,11): error: unknown type name 'PSLIST_HEADER'
   53 |     _Out_ PSLIST_HEADER ListHead
      |           ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\interlockedapi.h(61,13): error: unknown type name 'PSLIST_HEADER'
   61 |     _Inout_ PSLIST_HEADER ListHead
      |             ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\interlockedapi.h(69,13): error: unknown type name 'PSLIST_HEADER'
   69 |     _Inout_ PSLIST_HEADER ListHead,
      |             ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\interlockedapi.h(82,13): error: unknown type name 'PSLIST_HEADER'
   82 |     _Inout_ PSLIST_HEADER ListHead,
      |             ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\interlockedapi.h(95,13): error: unknown type name 'PSLIST_HEADER'
   95 |     _Inout_ PSLIST_HEADER ListHead
      |             ^
C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\um\interlockedapi.h(103,10): error: unknown type name 'PSLIST_HEADER'
  103 |     _In_ PSLIST_HEADER ListHead
      |          ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
```

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


More information about the libcxx-commits mailing list