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

    <tr>
        <th>Summary</th>
        <td>
            Improve `-Wdisabled-macro-expansion` warning and documentation
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          N-R-K
      </td>
    </tr>
</table>

<pre>
    The `-Wdisabled-macro-expansion` diagnostic text currently states, "disabled expansion of recursive macro".

I'm assuming the intention was to warn the user if they incorrectly thought that macros can recurse, however the warning text (nor the documentation [^0]) reflects that and is vague, confusing and/of misleading because it's implying that macros can be recursive, but macros don't recurse in C.

Proposed change to the diagnostic text:

```diff
- disabled expansion of recursive macro
+ macros cannot recurse, disabling expansion
```

[^0]: https://clang.llvm.org/docs/DiagnosticsReference.html#wdisabled-macro-expansion

- - -

Test case:

```c
/* compile with:
 * clang -Wdisabled-macro-expansion test.c
 */
static int x = 5;
#define x (x)

int main(void) { return x; }
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVFuLozAU_jXxJVg01ksffGinWxgWlmUY2OcYj5olJsXEXv79nuj04kJhqFSTk_Od7zuXVKa-lp8dUJJF4Z9aWl4pqMOei8GEcDlybaXRaKS15K021klBHVwcFeMwgHbqSq3jDixhb5QwdoOgd2dqGjoAHrfyBHRCxnMrEu1JtJ3_3wnLe8qtHXupW-qQj9QO0b37mVvqDL4GPVlGCwOVjf--4jFhkIfwPFxnxrZz-OZujmOp4PorOHiCnTnDCd09jgeconk1hBXazPu1EWOPsfkUnaQ7kv6ISLonbINQjcJgdo7BdU2lpSfejhO6MLoZrcdEC2EHFN5Lq4DXfq8CwZE7lQ7VWir7o7rOapd0K3iky6NW491cYylY7m6KUD19WyTy92COxmL2Rcd1Cz5vk6Rl7UiyfXbC6s5PLZtm3grp9-o4-7PdE39t3HPGZxyv89FNy6gLKo9sJ1vaOXe0niw74CMUSlopdepXZmhxAwuFXXfY38XZD2gAm1LAqnO9Iiw5v-zop6Ahxd_zxidY7G-OAl4kStyEI68tlr0_SoUNJV1396CTxVOmr-cKq2HdSjw8POK08DOF1cIpoBdKkj1NSbK7RU1qaKQGb2HFBfvymaR36bnERilORta-a0m-w5K4EQfogjC43v8nKIAyzrIoWWdFngZ1mdSbZMMDJ52C8r0_Dub0jSviNlF-LhZTFIyDKpfVbDFZY7XC3OHCF_XrFWKsvzhiuJR4H_h75ZDmMcuDrkyLuG7ifJ1WrFlzkcdQFJuURVkVZXG8jgLFK1C29F3EmIYznSDwGxsqkCWLGIuKmLGE5Wm0quKYrwGapsqiKoc1WUeAmVP3HguGcqJUja1Fo5LW2YcRryvZaoApHOLzES-gofwVfoQ_gylwORH_B6zHt9o">