<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJylWNtu4zYQ_RrlhbChmy968EMuu22AArvYFH01KGlksaFFVaTi-O97hpIvcbKbpAW0a4nkzJwzMyRnkptyv_pqtDa7Sd8KZ0QQJ-lsmc2EbEr-mMXZYh7Et-L2VgRp-Gj3z9MgvAvC6-H_P2sSDe1EMA8fqJWddHRHlWqUU6a50aZ4tEFyLa71Tu4tFgnT8ozYme7Rik1H0nlTO6W1yEn80ytHordU9VpUphO1cy2rCOKveDbK1X0-LcyWP0xpHDUb1dDhiylQA7mChOk70XZUUddRKazba7qE3kFwYYVpSEjbUuGEqYQbKVXA1nckdrUqalEasg1WO7GVDt9RGAbxDJMgsGM14CCbkYyX2Mo9hrqOR0tli95aMGdfAqQlEqoSBsY6pttZuKTXpZDamhG2sGZLrlbNBvIVBgiagnjZdiaXud6LJyWF9FgL01RqI56k7klY1YA-0yj6zgvlVMsnBW-yRxGFUziYFpA-QooaCx7ZVLx0krICj8xN78QjUctwAII13QbxDR4BF2iS1kFaqEYjHoKBm1KUx1yAlgZgCy2txTB-kSucCZvO9C1xsi13NTWipW6rnCPOCVcPaJGfD7Xp3Ne-Kbyyb831A4Bo-oODjwS792axGBjYxdLCAcBdyAYxRZZwcpUc6LbvWuPzCx7MqZDwvnfWABlUEfOOtGQInE4SsfRxGrPnT8MsOlXt2dA95GDj4BlW5BnxR1HDECzv_XBJT6QN6LFYg1zlNB1ltoi7Zms5HRzyIlcfkC6_2AnyUVEz2W7kYR_gFzPwI78so7SUyYwyomKZL4s8jBZ5mi9nVZEnBSXRssBI7JMDVOhZbltNh61wyKEP73AEEt6HdKM2tWMn9wqJjSm4rdlMYAZbaBKl6ygNFl-GHIrDOA6jKI3wL44xQGUSymy-zGflfBKt6bmN1meLZnE4jdP5Wm7LeTqEHb5jb8q21WoIHcP_zR8LhSkpl_blAfD7Yf9L4fatKqQ-585bDjsZa14GdSc5lZFRzB8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GMo22Uukp65mabnPVrbzKvN9YTOJedPY0iWRRm4bIAwZCp5ym1XlP4PuIsvxlq3H6EwICw13Xq47zmI_20EpdeWYrT-tfF5-OoA>53228</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-format: Add `SeparateDefinitionBlocks` option to keep inline method declarations grouped
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          akien-mga
      </td>
    </tr>
</table>

<pre>
    Follow-up to #45895 and #52976, CC @ksyx.

The new `SeparateDefinitionBlocks: Always` option works great and will be quite useful for https://github.com/godotengine/godot to enforce our preferred style.

There's one aspect of the new feature which doesn't match 100% what we'd want and which may warrant discussion, to see if other users would also prefer something different (probably via a new config value since the current behavior for `Always` does make sense). 

This is about keeping (for C++ at least) inline method definitions in a class declaration grouped (when permitted with `AllowShortFunctionsOnASingleLine: Inline`), as this can often be done purposefully because the methods are related to each other.
To clarify, I mean keeping the grouping chosen by the developer, not forcing them all to be grouped.

See https://github.com/akien-mga/godot/commit/c814da35e9eec8b8cb017b4b85fcb3ce318c0172 for an example of the current `SeparateDefinitionBlocks: Always` (as of nightly build `clang-format-14_14~++20220114111422+ed30a968b5d6-1_exp1_20220114111520.246_amd64`) being applied to the Godot codebase.

Here's a typical example of diff where the grouping was intentional (setter/getter couples) and the separation is not wanted:
```diff
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h
index f830c95b58..63493b1d9d 100644
--- a/servers/physics_server_3d.h
+++ b/servers/physics_server_3d.h
@@ -807,24 +807,31 @@ public:
        const PhysicsDirectSpaceState3D::RayParameters &get_parameters() const { return parameters; }
 
        void set_from(const Vector3 &p_from) { parameters.from = p_from; }
+
        const Vector3 &get_from() const { return parameters.from; }
 
        void set_to(const Vector3 &p_to) { parameters.to = p_to; }
+
        const Vector3 &get_to() const { return parameters.to; }
 
        void set_collision_mask(uint32_t p_mask) { parameters.collision_mask = p_mask; }
+
        uint32_t get_collision_mask() const { return parameters.collision_mask; }
 
        void set_collide_with_bodies(bool p_enable) { parameters.collide_with_bodies = p_enable; }
+
        bool is_collide_with_bodies_enabled() const { return parameters.collide_with_bodies; }
 
        void set_collide_with_areas(bool p_enable) { parameters.collide_with_areas = p_enable; }
+
        bool is_collide_with_areas_enabled() const { return parameters.collide_with_areas; }
 
        void set_hit_from_inside(bool p_enable) { parameters.hit_from_inside = p_enable; }
+
        bool is_hit_from_inside_enabled() const { return parameters.hit_from_inside; }
 
        void set_hit_back_faces(bool p_enable) { parameters.hit_back_faces = p_enable; }
+
        bool is_hit_back_faces_enabled() const { return parameters.hit_back_faces; }
 
        void set_exclude(const Vector<RID> &p_exclude);
```

On the other hand, for classes where the methods are only declared in class declaration and defined in the implementation .cpp, I do want all blocks to be separated, even inline ones.

This could be an `AlwaysButInline` or `AlwaysButClassDeclaration` option. I'm not 100% sure this would be a sane option to have or too specific to our preference, so this issue is very much for discussion purposes and I would understand if it's eventually decided not to add this flexibility.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylV9lu6zgS_RrlhbChxYv84IcsfWcCDNCNTmNeDUosWZzQokak4vjv5xQlL3Fyb5IeQIklklV1aiF5qrDqsP5hjbH7Sd8Kb0WUZrN5vpoL2Sj-mKer5SJK78X9vYhm8bM7vE6j-CGKb4f_f9UkGtqLaBE_USs76emBKt1or21zZ2z57KLsVtyavTw4LBK25Rmxt92zE9uOpA-m9toYUZD4b689id5R1RtR2U7U3resIkp_4NlqX_fFtLQ7_rDKemq2uqHjF7tADeRKErbvRNtRRV1HSjh_MHQNvYPg0gnbkJCupdILWwk_ulQBW9-R2Ne6rIWy5Bqs9mInPb6TOI7SOSbhwJ7VwAfZjM4EiZ08YKjreFRpV_bOwXOOJUA6IqErYWGsY3c7h5D0RglpnB1hC2d35GvdbCFfYYCgKUrztrOFLMxBvGgpZMBa2qbSW_EiTU_C6Qbusxtl3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