<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/61978>61978</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-format: friend declaration indentation
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          alejandroclaro
      </td>
    </tr>
</table>

<pre>
    Please consider allowing `friend declaration` in c++ to have a particular indentation.

**Access specifiers have no effect on the meaning of friend declarations (they can appear in private: or in public: sections, with no difference)**.  

So when `IndentAccessModifiers` and/or `AccessModifierOffset` are configured, the resulting format could be misleading to readers.

For example, we practice this:

```c++
class Foo
{
  friend Bar;

 public:

   // public functions.

  protected:

    // protected functions.

  private:

     // private functions.
 
  private:

    // member variables.
};
```
However, it's not possible with clang-format to leave the friend declaration with a different indentation to the members that are indeed affected by the access specifiers.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVFGvszYM_TXhxboVBArlgYd2V9X2MG3SfoFJTMmnkKAktLv_fkqgt-3XaZNQK-Ljk-NjG_ReXQxRx_Yntv_McAmjdR1q-oFGOis0Opv1Vn51f2pCTyCs8UqSA9Ta3pS5AKvzwSkyEiRFPAZlDatzUAYE4yfGTxAsjHglQJjRBSUWjQ6UkWRCgu9Y_sny4_bL43MUgrwHP5NQgyLnVwZjgYaBRABrIIwEE6GJMuwA7zI8MH4II32BQAM4z5TuhdmpKwZi5RHserD0Won47kmkTMZ_gZsKY7xRqmEgR0YQ4-0qbwfwrPkvC7eRTDTjt1TWKv93K1fx0Q80kvGzdRH0Gv5jGDyFhHHJ4kFdFkcyaog1OvKLDrHKwboJAwi7aAk9waS8JpQxFCw4QknOv7gZL6S_cZo1pZIIZociKEEQRuVZeXzxvs7XZ-vceio0eg9nazdQs53D3fITOlaenokejr6cAjB-Zvy8hWFYzGr37hU2OxtIBJLvBN8Md8h_kNy7_DPFgyMh3hjg_yk2hommnhxc0SnsNX1LaD4fhtw9XV9_tTe6kovNUIHxxoOxAWbrveo1rTMnNJrLx9bsYEFTnP04Cu8zvmbg95CG58WKyeuWRJkewoghDVnEkARMu0QS-q-Ew5-3bqsnk10p27LFjLqiPuRNs8_LIhs7WVRVP8jigFV7EG1etpXYU92UOVWFqNpMdTznZV7ldd7um6LYiVpwOpT1IPpCtrxhVU4TKr3T-jrtrLtkyvuFurpom0OmsSft0_eJc0M3SEHGefxcuS7mfPTLxbMq18oH_2AJKmjqnp2M6_0v_j3ZlS1Od2MIc9qL1OGLCuPS74SdGD9H8u3vY3b2B4nA-DlJ8oyfk-R_AgAA__8LA6-v">