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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] midl generate interfaces incorrectly identify interface opening brace as FunctionLBrace
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    Given the following code generated by midl from a com.idl, this incorrectly marks the opening `{`  as FunctionLBrace.

FunctionLBrace is the driver for RemoveSemicolons (its only as good as our FunctionLBrace detection), as such the trailing semi colon at the end of the interface will be incorrectly removed.

```c++
MIDL_INTERFACE("XXXXX-XXXXXX-XXXXXXX-XXXXXX")
IMyPersist : public IPersist
{
public:
    virtual Foo(void) = 0;
};
```

Debug trace
```
AnnotatedTokens(L=0, T=5, C=0):
 M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=0 Name=identifier L=10 PPK=2 FakeLParens= FakeRParens=0 II=0x162f3e082b0 Text='IMyPersist'
 M=0 C=1 T=InheritanceColon S=1 F=0 B=0 BK=0 P=23 Name=colon L=12 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text=':'
 M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=22 Name=public L=19 PPK=2 FakeLParens= FakeRParens=0 II=0x162f3e023e0 Text='public'
 M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=23 Name=identifier L=28 PPK=2 FakeLParens= FakeRParens=0 II=0x162f3e082e8 Text='IPersist'
 M=0 C=0 T=FunctionLBrace S=1 F=0 B=0 BK=1 P=23 Name=l_brace L=30 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text='{'
----
AnnotatedTokens(L=1, T=5, C=0):
 M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=0 Name=public L=6 PPK=2 FakeLParens= FakeRParens=0 II=0x162f3e023e0 Text='public'
 M=0 C=1 T=InheritanceColon S=0 F=0 B=0 BK=0 P=23 Name=colon L=7 PPK=2 FakeLParens= FakeRParens=0 II=0x0 Text=':'
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1VV9P2zAQ_zTJi0WVOG3aPOSBUjpVA4QYk_Y2OfGl9XBsZDuFfvudnYa2bENiG1Fi-_747nfnc67SfFd-EltQxG2ANFpK_STUmtSaA1mDAsMccFLtSCu4JI3RLWEobUdIRvQCtwlLhKq1MVA7iXrMPNhgTT-C8raiPImmcxwJYZYsO1U7odXV3LAaRlGyiJLzfjwVEdGb4QbxGcRmyB20egtfoBW1llpZEtGZcJZohY7R9lpr7mfdmVd-CAcHgY5o4XGjlu3qTfDgDBPSI7VomQTThLkgAsWJbsJSKAem8baehJSkgpOwTYDGT-LxgYe3jujcv4F7vVpcfV_d3F_eLc8vLjGCiNJv_jn7djwNM0o95LB1db27BWOFdSTKzsljV0lRk9Wet3c63fvppajXkwSfrTCuY5IstUa_Wy04mkZTC5JE2XzYvzishwCOo1pA1a19zmr4rda5Utr5qrnXD6AsOrpCD4lP-j0uJn5x0XOKA7prz-n5Qe2relD6SZEvuE7JMvDn_fg5TLdhvGEt4EJwUE40AuvEO0tRfOvVKFmyB7i6ZcYjwTg9efdCJmS18tNzmtMmg2RGK_QOzw6ZEZ0e0o3ELzjTgHOlNmCEY6qGi1A4bwKm2YC4r7IAlr4T7DFEn8DfYHtHDikdIO3LKWAq_i6BFL8jdPsS_EeA2R9Omc7-9pRhdnzKb5xxD_PVr-QPaNNXaOX3Kqh7qNl7C_LkjPFGD9jO8HnrmqUfes2OKiT_4AJ543Yl77ld0_90uV5-cjGUaZ7n-KVJEfMy40VWsNgJJ6GMJvNaMrU-w27VMhdNFn3fHDrpoYmcNs19Ze-OmszQPfsi-qVxxp2R5ca5RxtQLvFdC7fpqhE2ZySk3A7T2aPRP9APksLaDrBWlpPZOM_iTVmNGUwapCibNjmlac5mk7rK6hmjRZPmsWQVSOsDw2BiUdIElZK0SKaTSVKMprzhxTiZNrSg42RWR-MEWuymI-94pM06NmXAgD3DolDiRbMHIbNWrBXAYJ91bqNN2e44bEFiCgxnuzigLgPkn5g7h50">