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

    <tr>
        <th>Summary</th>
        <td>
            clang-tidy: Reduce modernize-use-using highlight area for typedef enums
        </td>
    </tr>

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

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

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

<pre>
    When someone defines a C-style enum with `typdef enum {...} name`, the entirety of the enum (from typedef to name) is highlighted by `modernize-use-using`. This can be a bit jarring in longer enums where there can be hundreds of lines of enum entries marked with a warning. It also doesn't seem to be in line with the rest of the `modernize-` lints; in `modernize-avoid-c-arrays`, `int arr[3]` would only highlight the `int` and not everything through the `[3]`, and `modernize-loop-convert` similarly only highlights the `for`. 

This issue is made worse in the VS Code clangd extension, where `modernize-` lints are marked as deprecated, and are struck-through in addition to being highlighted--greatly reducing readability of the enum entries. For example
![image](https://github.com/clangd/vscode-clangd/assets/4633429/969bab6a-8086-410c-94c2-7c26acc621ac)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VM2O4zgPfBrlQjiQ5b_k4EP_IMB3_Xaxe6Yt2laPLAWUnIz36Reyk-npwWAPiSGLZLGqaGIIZnREraheRfV-wCVOnltk87G4Q-f12v49kYPgZ_KOQNNgHAVAeMtCXC0BuWWGu4kTiFrG9app2N-J5vV4PIrmHRzOJGop1BvEKWVEwxRX8MPjnKLVaWA_Q1yvlEpEv6epM5gAkxkna8YpkoZuTUiz18TO_EPZEtLPuFHU8gh_TiZAjw46AoTORPhAZuNGMA6sdyPxBhjgPhFTaoDpmTAtTjPpkDqzG0__IEMusqEAM_I30jtfhDuyM248wv8ioA0etKfghGoiBKI5kehoAzaO9qREmCnEJ_kvVEQtU2gMonhNaV8u8eaNzvoMmXENDz1FLY2LgMyiei1E9Z5K3P1iNXhn10_hnmDGxRSCToPzEehGvMYp6RMn9ss4PQM_6yWcFP-lG-v9Neu9uxFvBYOZjUW26y-44Vlv8LwZJOS7kC_7_2aWCWGhZPKMmuDuOWySpbS__oA3rwl6i27UQN8juWC8Sx3t9v1ePkCmp1UYQNOVqcdI-kkl3YfIS_8te9I2DlBrE413u29Jk5_mLstGJox2BSa99OmWCTV2xppfZvkxLEe4eAb6jvPV0oO2ykX1amYcKWmrTlOM1yCKF6EuQl1GE6elO_Z-Fuqykxbqcgu915T9OGMIFINQl7IuilKdhbqc63OHXY3ZSZ7qrMxln53LXmVNr2rs-1rl2At13ps46LbQ5-KMB2rz-lTKWhayOUxtN9S57sqyrIauH5qqqbAusKCTLlQnG3kwrZKqkFVe5rLIy-ZYFydFvcoxH05DdVKilDSjsUdrb_PR83jY3G1r1Uh1sNiRDduqUcrRfbdeKJU2D7cpJ-uWMYhSWhNi-KwSTbTUbgpk0ehVFC_w_2QDwW8WwU9Tj0wIg-cfe2X79g8L2_Y_pE-4j0d2Zf9BfRTqsnWbdN_Y_BsAAP__FNC85w">