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

    <tr>
        <th>Summary</th>
        <td>
            `readability-misleading-indentation` broken for `if constexpr` inside of `namespace`
        </td>
    </tr>

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

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

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

<pre>
    Related to #43835 and #31552.

Here's a minimal example:
```cpp
namespace {

template<int N>
constexpr auto lam = []{
    if constexpr (N == 1) {
    } else { // THAT
 }
};
void foo() {
    lam<2>();
}

}
```
where on `// THAT` line I get `Different indentation for 'if' and corresponding 'else' [readability-misleading-indentation]`. If I remove the enclosing `namespace {`, the warning disappears.

>From YCM info I read that
> clangd version 15.0.1 (https://github.com/ycm-core/llvm 708056a3d8259ce1d9fc0f15676d13b53cc23835)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU01v6zYQ_DXUZWGBH6I-Djok9jNeDs2hyKVHmlzZbClSIGkn-fcFZTexW6B4gGGBnOFwdmepUrJHjzgS-UzkrlLnfApxfEoZYz9Uh2A-x9_RqYwGcgDCRSN6IUF5UxaCSclrQneEPl3_f2JEwrsECmbr7awc4IeaF4dE3CikpdefXpbrjlczpkVpBNI936tlnJdyORFb6zO8EvHjCujgU8aPJYI65wBOzUDEDq5VfIkAANgJvsmE96-FWLiM8AEeqKTbAbq0ugDC94Tv4e3n09uNQbrdzVu3I-J27hKsgSkEwvv_6Dk1E7HlxfSKfh36VvrX8p_OXJfvJ4wIwUPZubPTUnDWI7zAEXMBd3aaMKLPYL1Bn1W2wcMUSsGdnQjv1sB0iBHTEryx_ligUmwBiXyOqIw6WGfz52a2yaEqpM2dXmlsS2t4meAFIs7hgpBPCOi1C2lVbOljksX2diW9q-gLxdiklgVVTA9Ts49hhj-2v4H1U1jllYF8UvlGEj9AO-WPBi4YUymOyZrWrAR6ynlJZbjWDh1tPp0PtQ4z4ftPPW90KAO5d-4yQ0d7KlslTM_loJGZYdJ0YrLtWsPEQQqteRnvktV6cWVGYQYxqApH1nb9QCmntDqN_WQ60au-U6yVtGeM6qGRtG94g7JRrLIjp1xQwSTrGKW0FgPtZNcyZdSgKWtIQ3FW1tXFWR3isbIpnXFsWSNk5dQBXVpfJece32EFCeflkcaxnNkczsdEGupsyulbJdvscCQt_YVEWwqHGP7C26y09P6xFNT6ZA1CmB6yJS2tztGN_9P5Yuf22Swx_Ik6E75fi0iE79ci_w4AAP__dhhQew">