From 2c8ca92e8c9031e370ea0962732a264262e464e4 Mon Sep 17 00:00:00 2001 From: Aaron Siddhartha Mondal Date: Wed, 8 May 2024 19:02:22 +0200 Subject: [PATCH] Don't ignore GCC-specific warning under Clang Clang doesn't know `-Wnon-template-friend`. --- 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