File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed
runtime/core/exec_aten/util Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -913,21 +913,23 @@ struct promote_types {
913913 }
914914#endif
915915
916- #define ET_INTERNAL_SWITCH (TYPE, CONTEXT, NAME, ...) \
917- [&] { \
918- const auto & _st = TYPE; \
919- constexpr const char * et_switch_name = NAME; \
920- (void )et_switch_name; /* Suppress unused var */ \
921- switch (_st) { \
922- __VA_ARGS__ \
923- default : \
924- CONTEXT.fail (torch::executor::Error::InvalidArgument); \
925- ET_LOG ( \
926- Error, \
927- " Unhandled dtype %s for %s" , \
928- ::executorch::runtime::toString (_st), \
929- et_switch_name); \
930- } \
916+ #define ET_INTERNAL_SWITCH (TYPE, CONTEXT, NAME, ...) \
917+ [&] { \
918+ const auto & _st = TYPE; \
919+ constexpr const char * et_switch_name = NAME; \
920+ (void )et_switch_name; /* Suppress unused var */ \
921+ C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED (" -Wswitch-enum" ) \
922+ switch (_st) { \
923+ __VA_ARGS__ \
924+ default : \
925+ CONTEXT.fail (torch::executor::Error::InvalidArgument); \
926+ ET_LOG ( \
927+ Error, \
928+ " Unhandled dtype %s for %s" , \
929+ ::executorch::runtime::toString (_st), \
930+ et_switch_name); \
931+ } \
932+ C10_DIAGNOSTIC_POP () \
931933 }()
932934
933935#define ET_INTERNAL_SWITCH_CASE_INT_TYPES (CTYPE_ALIAS, ...) \
You can’t perform that action at this time.
0 commit comments