From 1f644fffb170b1e22f04f4c068e3ffb30c9f0763 Mon Sep 17 00:00:00 2001 From: Anthony Latsis Date: Tue, 5 Aug 2025 12:53:54 +0100 Subject: [PATCH] clang: Adjust for MSVC's default underlying type for enums ``` 10:26:31 C:\Users\swift-ci\jenkins\workspace\swift-rebranch-windows-toolchain\llvm-project\clang\lib\Driver\BoundsSafetyArgs.cpp(196): error C2672: 'llvm::has_single_bit': no matching overloaded function found 10:26:34 C:\Users\swift-ci\jenkins\workspace\swift-rebranch-windows-toolchain\llvm-project\llvm\include\llvm/ADT/bit.h(147): note: could be 'bool llvm::has_single_bit(T) noexcept' 10:26:34 C:\Users\swift-ci\jenkins\workspace\swift-rebranch-windows-toolchain\llvm-project\clang\lib\Driver\BoundsSafetyArgs.cpp(196): note: 'bool llvm::has_single_bit(T) noexcept': could not deduce template argument for '' 10:26:34 C:\Users\swift-ci\jenkins\workspace\swift-rebranch-windows-toolchain\llvm-project\llvm\include\llvm/ADT/bit.h(146): note: 'std::enable_if_t' : Failed to specialize alias template ``` --- clang/include/clang/Basic/LangOptions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/include/clang/Basic/LangOptions.h b/clang/include/clang/Basic/LangOptions.h index 49c4800d37f91..53ae2757d64e5 100644 --- a/clang/include/clang/Basic/LangOptions.h +++ b/clang/include/clang/Basic/LangOptions.h @@ -461,7 +461,7 @@ class LangOptionsBase { }; /* TODO(BoundsSafety) Deprecate the flag */ - enum BoundsSafetyNewChecks { + enum BoundsSafetyNewChecks : uint8_t { BS_CHK_None = 0, BS_CHK_AccessSize = 1 << 0, // rdar://72252593