Skip to content

Commit 05a1bf5

Browse files
committed
Disable -Wcast-function-type-mismatch warning on clang for VTUtils::getOffset.
1 parent 2adc4ba commit 05a1bf5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/mockutils/VTUtils.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ namespace fakeit {
2626
#if defined(__GNUG__) && !defined(__clang__) && __GNUC__ >= 8
2727
#pragma GCC diagnostic push
2828
#pragma GCC diagnostic ignored "-Wcast-function-type"
29+
#elif defined(__clang__)
30+
#pragma clang diagnostic push
31+
#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
2932
#endif
3033
template<typename C, typename R, typename ... arglist>
3134
static unsigned int getOffset(R (C::*vMethod)(arglist...)) {
@@ -35,6 +38,8 @@ namespace fakeit {
3538
}
3639
#if defined(__GNUG__) && !defined(__clang__) && __GNUC__ >= 8
3740
#pragma GCC diagnostic pop
41+
#elif defined(__clang__)
42+
#pragma clang diagnostic pop
3843
#endif
3944

4045
template<typename C>

0 commit comments

Comments
 (0)