AK: Enable format string checking in Clang builds

Format string checking was disabled in Clang-based builds due to a
compiler bug: https://github.com/llvm/llvm-project/issues/51182. Now
that the requirement has been raised to Clang 17, that is no longer
necessary.

This has been tested to work correctly with Apple Clang 15.0.0 (which is
the *least modern* supported compiler), as well as CLion 2024.1's
bundled Clangd.
This commit is contained in:
Daniel Bertalan 2024-05-21 11:59:32 +02:00 committed by Andrew Kaster
parent 9d3b73743e
commit 637ccacce5
Notes: sideshowbarker 2024-07-17 04:57:23 +09:00

View file

@ -11,14 +11,6 @@
#include <AK/Array.h> #include <AK/Array.h>
#include <AK/StringView.h> #include <AK/StringView.h>
#ifdef ENABLE_COMPILETIME_FORMAT_CHECK
// FIXME: Seems like clang doesn't like calling 'consteval' functions inside 'consteval' functions quite the same way as GCC does,
// it seems to entirely forget that it accepted that parameters to a 'consteval' function to begin with.
# if defined(AK_COMPILER_CLANG)
# undef ENABLE_COMPILETIME_FORMAT_CHECK
# endif
#endif
#ifdef ENABLE_COMPILETIME_FORMAT_CHECK #ifdef ENABLE_COMPILETIME_FORMAT_CHECK
namespace AK::Format::Detail { namespace AK::Format::Detail {