<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/105782>105782</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] [request] Align trailing return types
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
EmrecanKaracayir
</td>
</tr>
</table>
<pre>
Is there a style option for aligning trailing return types?
Example:
```cpp
[[nodiscard]] auto angle() const noexcept -> T;
[[nodiscard]] auto magnitude() const noexcept -> T;
[[nodiscard]] auto normalized() const noexcept -> Vector2;
[[nodiscard]] auto reflected(const Vector2& normal) const noexcept -> Vector2;
[[nodiscard]] auto rotated(T angle) const noexcept -> Vector2;
```
If there is not a style option currently achieving this, I suggest it should be added because it really helps understanding what a method does when skimming through crowded classes.
It is way easier than this:
```cpp
[[nodiscard]] auto angle() const noexcept -> T;
[[nodiscard]] auto magnitude() const noexcept -> T;
[[nodiscard]] auto normalized() const noexcept -> Vector2;
[[nodiscard]] auto reflected(const Vector2& normal) const noexcept -> Vector2;
[[nodiscard]] auto rotated(T angle) const noexcept -> Vector2;
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUlNFvmz4Qx_8a83JKRAxJ4IGH9pdGqn6v1d4P-wLejM3sc9Psr58g6bZWVZdJ1aQhBDbIn-_d-evDGE3niBqxvhXrXYaJex-auyGQQvc_BlR4MiFrvT419xG4p0CAEPlkCfzIxjs4-ABoTeeM64ADGjsNAnEKDvg0UhTFXuQ7kd-cn3dPOIyWRHGZi01-vtU4nr8AAMwh3TqvTVQYtFjvxHoHmNgDus6SkJWQNSjvIoPz9KRoZFiI4g4eRHF7FWjAzhlO-kNgzocBrflG-h3aJ1Lsg7yWGehgSfGMPOOeAXJzEbxa6T0Zz3gWeXgubg2vr2tEfmzlr_t9f7gYx0Rwnl_7R6UQyLE9Aare0ONso95EIf-De4ip6ygyGIbY-2Q1tASoNU0DhSnS9CsQWnuCnuwYITlNITI6PaGOPU6SA3HvNWhPEY49OYhfzDCctYJPXQ8q-OOEVRZjpLh8kQJPwR_xBITRUADu0Z2j_Odc_OEW_kv-_c1JecvCf2TZTDeFrosaM2pWW1kW1bbe1lnfFCpfyXxVltt13SpdVatyq4u20FpVWtMmM43MZZlXssjLoi7qZZFXKPGAuthQi6tKlDkNaOzS2sdh6UOXmRgTNat8va1kZrElG-cmLKWy6LrFYaoNCymnthyaad2iTV0UZW5N5PiTxIbt3MBfLFzvpmIF-poozrObqUO_3Z6zFGzTM4-zmeVeyH1nuE_tUvlByP0kdXktxuA_k2Ih93MGUcj9JYnHRn4PAAD__3SB9-U">