mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-23 21:14:31 +00:00
Everywhere: Run clang-format
The following command was used to clang-format these files:
clang-format-18 -i $(find . \
-not \( -path "./\.*" -prune \) \
-not \( -path "./Base/*" -prune \) \
-not \( -path "./Build/*" -prune \) \
-not \( -path "./Toolchain/*" -prune \) \
-not \( -path "./Ports/*" -prune \) \
-type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
There are a couple of weird cases where clang-format now thinks that a
pointer access in an initializer list, e.g. `m_member(ptr->foo)`, is a
lambda return statement, and it puts spaces around the `->`.
This commit is contained in:
@@ -172,11 +172,14 @@ namespace Web::HTML {
|
||||
#define SWITCH_TO_AND_EMIT_CURRENT_CHARACTER(new_state) \
|
||||
SWITCH_TO_AND_EMIT_CHARACTER(current_input_character.value(), new_state)
|
||||
|
||||
// clang-format-18 handles the `state:` label rather badly.
|
||||
// clang-format off
|
||||
#define BEGIN_STATE(state) \
|
||||
state: \
|
||||
case State::state: { \
|
||||
{ \
|
||||
{
|
||||
// clang-format on
|
||||
|
||||
#define END_STATE \
|
||||
VERIFY_NOT_REACHED(); \
|
||||
|
||||
Reference in New Issue
Block a user