Skip to content

Commit 32cd537

Browse files
authored
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: #1557
1 parent aa16588 commit 32cd537

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

include/rmm/mr/device/pool_memory_resource.hpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,19 @@ struct maybe_remove_property<PoolResource,
7575
Upstream,
7676
Property,
7777
cuda::std::enable_if_t<!cuda::has_property<Upstream, Property>>> {
78-
#ifdef __GNUC__ // GCC warns about compatibility issues with pre ISO C++ code
78+
#if defined(__GNUC__) && !defined(__clang__) // GCC warns about compatibility
79+
// issues with pre ISO C++ code
7980
#pragma GCC diagnostic push
8081
#pragma GCC diagnostic ignored "-Wnon-template-friend"
81-
#endif // __GNUC__
82+
#endif // __GNUC__ and not __clang__
8283
/**
8384
* @brief Explicit removal of the friend function so we do not pretend to provide device
8485
* accessible memory
8586
*/
8687
friend void get_property(const PoolResource&, Property) = delete;
87-
#ifdef __GNUC__
88+
#if defined(__GNUC__) && !defined(__clang__)
8889
#pragma GCC diagnostic pop
89-
#endif // __GNUC__
90+
#endif // __GNUC__ and not __clang__
9091
};
9192
} // namespace detail
9293

0 commit comments

Comments
 (0)