Skip to content

Conversation

@hjyamauchi
Copy link
Contributor

No description provided.

git apple-llvm automerger added 30 commits July 27, 2025 13:43
git apple-llvm automerger and others added 20 commits July 29, 2025 18:15
If an error occurs in FrontendAction::BeginSourceFile after
IncludeTreeActionController::initializeModuleBuild is called (via
BeginInvocation), the builder is left in an inconsistent state because
there is no call to finalizeModuleBuild (via HandleTranslationUnit), so
we should exit early without attempting to create an include tree for
the broken module. Fixes a crash on invalid seen with a missing module
header, but there could be other similar cases.

rdar://151878898
[next] Revert "Revert "[ADT] Deprecate PointerUnion::{is,get} (NFC) (llvm#122623)""
…vm#11083)

* Revert "[BoundsSafety] Don't bind lvalues with temporary locations (llvm#10969)"

This reverts commit e7a3802.

* Adjust some failing CodeGen tests
…sh-on-invalid

[clang][cas] Fix crash on invalid with IncludeTreeBuilder
This fixes the windows build with MSVC.
llvm::has_single_bit and llvm::countr_zero both require that the
argument type is unsigned but the default underlying type for enums
is int, which causes build errors with MSVC.

This fixes the windows build with MSVC.

```
FAILED: tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/BoundsSafetyArgs.cpp.obj
C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe  /nologo /TP -DCLANG_BUILD_STATIC -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__SHORT_FILE__=\"BoundsSafetyArgs.cpp\" -IC:\Users\hiroshi\cas\llvm-project\build\tools\clang\lib\Driver -IC:\Users\hiroshi\cas\llvm-project\clang\lib\Driver -IC:\Users\hiroshi\cas\llvm-project\clang\include -IC:\Users\hiroshi\cas\llvm-project\build\tools\clang\include -IC:\Users\hiroshi\cas\llvm-project\build\include -IC:\Users\hiroshi\cas\llvm-project\llvm\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /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 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -std:c++17 -MD  /EHs-c- /GR- /showIncludes /Fotools\clang\lib\Driver\CMakeFiles\obj.clangDriver.dir\BoundsSafetyArgs.cpp.obj /Fdtools\clang\lib\Driver\CMakeFiles\obj.clangDriver.dir\ /FS -c C:\Users\hiroshi\cas\llvm-project\clang\lib\Driver\BoundsSafetyArgs.cpp
C:\Users\hiroshi\cas\llvm-project\clang\lib\Driver\BoundsSafetyArgs.cpp(196): error C2672: 'llvm::has_single_bit': no matching overloaded function found
C:\Users\hiroshi\cas\llvm-project\llvm\include\llvm/ADT/bit.h(147): note: could be 'bool llvm::has_single_bit(T) noexcept'
C:\Users\hiroshi\cas\llvm-project\clang\lib\Driver\BoundsSafetyArgs.cpp(196): note: 'bool llvm::has_single_bit(T) noexcept': could not deduce template argument for '<unnamed-symbol>'
C:\Users\hiroshi\cas\llvm-project\llvm\include\llvm/ADT/bit.h(146): note: 'std::enable_if_t<false,void>' : Failed to specialize alias template
```
```
FAILED: tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/BoundsSafetyArgs.cpp.obj
C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe  /nologo /TP -DCLANG_BUILD_STATIC -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__SHORT_FILE__=\"BoundsSafetyArgs.cpp\" -IC:\Users\hiroshi\cas\llvm-project\build\tools\clang\lib\Driver -IC:\Users\hiroshi\cas\llvm-project\clang\lib\Driver -IC:\Users\hiroshi\cas\llvm-project\clang\include -IC:\Users\hiroshi\cas\llvm-project\build\tools\clang\include -IC:\Users\hiroshi\cas\llvm-project\build\include -IC:\Users\hiroshi\cas\llvm-project\llvm\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /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 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -std:c++17 -MD  /EHs-c- /GR- /showIncludes /Fotools\clang\lib\Driver\CMakeFiles\obj.clangDriver.dir\BoundsSafetyArgs.cpp.obj /Fdtools\clang\lib\Driver\CMakeFiles\obj.clangDriver.dir\ /FS -c C:\Users\hiroshi\cas\llvm-project\clang\lib\Driver\BoundsSafetyArgs.cpp
C:\Users\hiroshi\cas\llvm-project\llvm\include\llvm/ADT/bit.h(158): error C2338: static_assert failed: 'Only unsigned integral types are allowed.'
C:\Users\hiroshi\cas\llvm-project\llvm\include\llvm/ADT/bit.h(158): note: the template instantiation context (the oldest one first) is
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet