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