From 32cd537a55b81726940bb698013a0d684e338c86 Mon Sep 17 00:00:00 2001 From: Aaron Siddhartha Mondal Date: Tue, 14 May 2024 11:49:39 +0200 Subject: [PATCH] Don't ignore GCC-specific warning under Clang (#1557) Clang doesn't know `-Wnon-template-friend`. Authors: - Aaron Siddhartha Mondal (https://github.com/aaronmondal) Approvers: - Mark Harris (https://github.com/harrism) - Michael Schellenberger Costa (https://github.com/miscco) URL: https://github.com/rapidsai/rmm/pull/1557 --- include/rmm/mr/device/pool_memory_resource.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/rmm/mr/device/pool_memory_resource.hpp b/include/rmm/mr/device/pool_memory_resource.hpp index 5c0b9a29f..a3a972904 100644 --- a/include/rmm/mr/device/pool_memory_resource.hpp +++ b/include/rmm/mr/device/pool_memory_resource.hpp @@ -75,18 +75,19 @@ struct maybe_remove_property>> { -#ifdef __GNUC__ // GCC warns about compatibility issues with pre ISO C++ code +#if defined(__GNUC__) && !defined(__clang__) // GCC warns about compatibility + // issues with pre ISO C++ code #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-template-friend" -#endif // __GNUC__ +#endif // __GNUC__ and not __clang__ /** * @brief Explicit removal of the friend function so we do not pretend to provide device * accessible memory */ friend void get_property(const PoolResource&, Property) = delete; -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic pop -#endif // __GNUC__ +#endif // __GNUC__ and not __clang__ }; } // namespace detail