Disable fallthrough warnings for clang compiler

This commit is contained in:
Tobias Kölsch 2022-10-11 10:26:05 +02:00
parent 806c519c91
commit 39863eb784
1 changed files with 9 additions and 0 deletions

View File

@ -77,6 +77,15 @@ namespace exprtk
#define exprtk_disable_fallthrough_end \
_Pragma ("GCC diagnostic pop") \
#elif defined(__clang__)
#define exprtk_disable_fallthrough_begin \
_Pragma ("clang diagnostic push") \
_Pragma ("clang diagnostic ignored \"-Wimplicit-fallthrough\"") \
#define exprtk_disable_fallthrough_end \
_Pragma ("clang diagnostic pop") \
#else
#define exprtk_disable_fallthrough_begin (void)0;
#define exprtk_disable_fallthrough_end (void)0;