From 10cf431fc9817440304013788797b7948e6fa950 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sun, 4 Aug 2024 21:27:00 -0400 Subject: [PATCH] Fix -Wunknown-pragmas warnings with gcc in swift demangling code Cherry-picks https://github.com/swiftlang/swift/pull/75681 --- third_party/swift/include/swift/Demangling/ManglingMacros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/swift/include/swift/Demangling/ManglingMacros.h b/third_party/swift/include/swift/Demangling/ManglingMacros.h index 5cf3863..c93f450 100644 --- a/third_party/swift/include/swift/Demangling/ManglingMacros.h +++ b/third_party/swift/include/swift/Demangling/ManglingMacros.h @@ -17,12 +17,12 @@ #define MANGLE_AS_STRING(M) STRINGIFY_MANGLING(M) /// The mangling prefix for the new mangling. -#if !defined(_MSC_VER) || _MSC_VER-0 >= 1926 +#if defined(__clang__) _Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \"-Wdollar-in-identifier-extension\"") #endif #define MANGLING_PREFIX $s -#if !defined(_MSC_VER) || _MSC_VER-0 >= 1926 +#if defined(__clang__) _Pragma("clang diagnostic pop") #endif