parse/enum: workaround fmtlib#1824 warnings in clang

This commit is contained in:
Danny Robson 2022-01-25 15:55:18 +10:00
parent af3188bd16
commit 4e4e731cb7

View File

@ -10,6 +10,7 @@
#include "fwd.hpp" #include "fwd.hpp"
#include "../platform.hpp"
#include "../debug/panic.hpp" #include "../debug/panic.hpp"
#include "../introspection/name.hpp" #include "../introspection/name.hpp"
#include "../log.hpp" #include "../log.hpp"
@ -183,10 +184,20 @@ namespace cruft::parse::enumeration {
}); });
if (!success) if (!success)
// clang#XXX
// fmtlib#1824
// generates "unused type alias 'char_type'" under clang
#if defined(COMPILER_CLANG)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-local-typedef"
#endif
LOG_WARN ( LOG_WARN (
"duplicate parse setup for {:s} was ignored", "duplicate parse setup for {} was ignored",
cruft::introspection::name::bare<EnumT> () cruft::introspection::name::bare<EnumT> ()
); );
#if defined(COMPILER_CLANG)
#pragma GCC diagnostic push -Wno-unused-local-typedef
#endif
return cookie {}; return cookie {};
} }