Skip to content

Commit adda8b2

Browse files
committed
Better detection of apple clang for -Wcast-function-type-mismatch warning ignoring.
1 parent ddf13e9 commit adda8b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/mockutils/VTUtils.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ 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__) && __clang_major__ >= 19
29+
#elif defined(__clang__) && ((defined(__apple_build_version__) && __clang_major__ >= 17) || (!defined(__apple_build_version__) && __clang_major__ >= 19))
3030
#pragma clang diagnostic push
3131
#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
3232
#endif
@@ -38,7 +38,7 @@ namespace fakeit {
3838
}
3939
#if defined(__GNUG__) && !defined(__clang__) && __GNUC__ >= 8
4040
#pragma GCC diagnostic pop
41-
#elif defined(__clang__) && __clang_major__ >= 19
41+
#elif defined(__clang__) && ((defined(__apple_build_version__) && __clang_major__ >= 17) || (!defined(__apple_build_version__) && __clang_major__ >= 19))
4242
#pragma clang diagnostic pop
4343
#endif
4444

0 commit comments

Comments
 (0)