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

    <tr>
        <th>Summary</th>
        <td>
            modernize-macro-to-enum should not warn when only 1 constant is created
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy,
            false-positive
      </td>
    </tr>

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

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

<pre>
    Consider the following code:

```
#define FOO (123)
```

clang-tidy will trigger modernize-macro-to-enum here:
https://godbolt.org/z/T4qvMhs7q

I believe this is incorrect advice - the better fix is to simply create a constexpr constant. Enums make sense when you have multiple related constants, but when it's only one constant users should not turn it into an enum.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0Ut2OnDwMfZpwYzEKZn6WCy6-b7dIvaj2pi8QiIG0IWFjw-zs01fMbHdWVStZBkcnds7xMcxuCES1OvyvDk-ZWWSMqe5M8pEH41d6m7M22kv9GAM7SwlkJOij9_HswgBdtKTK_5R-Uvp3Pur3uJVYWupdIGien0HhQ4Glwurv2GvuvAlDLs5e4Oy8B0luGCjBFC2l4N4on0yXYi4xp7BMMFK6v2EUmXmrsFHYDNG20csupkFh86aw-b5_Wb-NfHr5PPErtOQdrQQyOoYtQhdTok7A2NV1BPmVeEsilKB3rxtIIrCbZn-BLpERAgNdDCz0Oqfbnwmygy9hmRgm85OAKTDBeaQAl7jAaFaCafHiZk-QyBsh-3GTFT5Cu8gN70ThiSEGf4EY6AMFC1Ni4DEu3kKIArKkDQ4uSAQTYBNpdyOa2bq0VVmZjOripMvioI8nnY11XxWnstNoTmXR9-0Rje5LrXW7L_DhYMvM1aixLBALXeG-1LuiosNDq6vK2M4cD3u11zQZ53fer9MmeOaYF6pPx6I8Zt605PlqM8T7ghWiwkeF2BvPlM-RnbiVtuPDU5bqrVfeLgOrvfaOhe_dxYmn-l-e-CTH2aRwk_CqXXFXzvH74my2JF__YR0n49LuujgpbLap7598TvEHdaKwuRJkhc2V468AAAD__10iE8Q">