From 0253342c1acdeaf1668b1a3e367aacead0a5f30d Mon Sep 17 00:00:00 2001 From: ayeteadoe Date: Thu, 8 May 2025 19:27:27 -0700 Subject: [PATCH] LibRegex: Use `NO_UNIQUE_ADDRESS` in RegexMatch for Windows support Clang's `x86_64-pc-windows-msvc` target requires `[[msvc::no_unique_address]]`, which is properly set in the `NO_UNIQUE_ADDRESS` macro in `AK/Platform.h`. Without this, building on Windows fails due to `-Wunknown-attributes`. --- Libraries/LibRegex/RegexMatch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LibRegex/RegexMatch.h b/Libraries/LibRegex/RegexMatch.h index 3d21bf305cf..c6200f87fec 100644 --- a/Libraries/LibRegex/RegexMatch.h +++ b/Libraries/LibRegex/RegexMatch.h @@ -301,8 +301,8 @@ public: } private: - [[no_unique_address]] Variant m_view { StringView {} }; - [[no_unique_address]] bool m_unicode { false }; + NO_UNIQUE_ADDRESS Variant m_view { StringView {} }; + NO_UNIQUE_ADDRESS bool m_unicode { false }; }; class Match final {