1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-01 11:39:22 +00:00

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

View File

@ -11,14 +11,6 @@
#include <AK/Array.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
namespace AK::Format::Detail {