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

    <tr>
        <th>Summary</th>
        <td>
            RecursiveASTVisitor does not traferse into attributes under AttributedStmt
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    Example code:

```
int x = 0;
switch(x)
{
case 1: [[fallthrough]];
case 2:
};
```

```
AttributedStmt 0x558897c6f2d0
|-FallThroughAttr 0x558897c6f2a8
`-NullStmt 0x558897c6f2a0
```

NullStmt is visited but TraverseFallThroughAttr is not being called.
This is because DEF_TRAVERSE_STMT macro is used to visit AttributedStmt, and it only checks StmtChildren not attributes.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8Uk2PmzAQ_TXmYiUydvg6cMhuwqmtqg3aQy8rYw_g1sEre5xm_30FyX6lVSULhN-892YeI0MwwwRQk-yOZLtERhydr78bh_7H4UvSOf1S78_y-GyBKqeBiC1hO8Jenzm7nuXTTEjPlIgdZUTcXe7Cb4NqJLw8E15dWcUVUzIATYnY0sX_rpfW4uhdHEaS7eYjPlbyd_fiHbrp4Z-XW0RvuoigD3hEys5ZVpZVofKe61decb9qpLXtxX9mfKqT5Zvy6lu09i8hyf7TzxvDBHoywSBo2kWkrZcn8AFunU2gk0PagZkGqqS1oNcXpXY0YYY7UDIGoLt989Q-bB_3D4f906H92tKjVN7NJTGApuguhvRzBoTfUzlpapC6yb5QNYL6FegM3Y_Gag_T0oF8ZYV1omuhK1HJBOo0L1OWb_KKJWOdc1aKoiuKkveaQ1qplDHBclX2kGnRJ6bmjAu2YVVa8k3G1lwKpbUE4JrpXDKyYXCUxq6tPR3Xzg-JCSHCrCzSxMoObFh2lHNl5TQQse29mxAmTTifN9fXM3XVxSGQDbMmYHgXQ4MW6gdQ0Qdzgu2hfZwjcZ5qB5ek0ct-_hHUTOg-TE3jpMHfhJdEb-sR8TnMG8kbwpvB4Bi7tXJHwpvZ-PpaPXv3ExQS3iwjBcKbZao_AQAA__-moRK1">