Skip to content

Commit

Permalink
AK: Enable format string checking in Clang builds
Browse files Browse the repository at this point in the history
Format string checking was disabled in Clang-based builds due to a
compiler bug: llvm/llvm-project#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.
  • Loading branch information
BertalanD committed May 29, 2024
1 parent 699f581 commit c91d507
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions AK/CheckedFormatString.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down

0 comments on commit c91d507

Please sign in to comment.