From e56e5e9b3133225d5966017d5d821c52fd6852bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 13 Feb 2024 18:34:30 +0100 Subject: [PATCH] GL: expand the Clang-CL warning suppression to regular Clang as well. Both are a thing on Windows, so both need the same. --- src/Magnum/GL/Context.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index c6f0c2406..4071aafbf 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -673,9 +673,10 @@ Context* currentContext = nullptr; called from. To avoid #ifdef hell in code below, the currentContext is redefined to return a value from this uniqueness-ensuring function. */ #if defined(CORRADE_TARGET_WINDOWS) && defined(MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS) && !defined(CORRADE_TARGET_WINDOWS_RT) -/* Clang-CL complains that the function has a return type incompatible with C. - I don't care, I only need an unmangled name to look up later at runtime. */ -#ifdef CORRADE_TARGET_CLANG_CL +/* Clang-CL (and regular Clang as well) complains that the function has a + return type incompatible with C. I don't care, I only need an unmangled name + to look up later at runtime. */ +#ifdef CORRADE_TARGET_CLANG #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wreturn-type-c-linkage" #endif @@ -683,7 +684,7 @@ extern "C" CORRADE_VISIBILITY_EXPORT Context*& magnumGLUniqueCurrentContext(); extern "C" CORRADE_VISIBILITY_EXPORT Context*& magnumGLUniqueCurrentContext() { return currentContext; } -#ifdef CORRADE_TARGET_CLANG_CL +#ifdef CORRADE_TARGET_CLANG #pragma clang diagnostic pop #endif