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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy]: readability-simplify-boolean-expr wants to use DeMorgan's theorem on macros despite IgnoreMacros
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          nick-potenski
      </td>
    </tr>
</table>

<pre>
    clang-tidy produces a `readability-simplify-boolean-expr` warning to simplify expressions with macros using DeMorgan's theorem despite `readability-simplify-boolean-expr.IgnoreMacros` being set to `true`.

Simplified test case:
```
#define is_a_favorite_number(_i) (_i == 42 || _i == 3 || _i == 1000000)

bool UseNumber(int i) { return i >= 0 && !is_a_favorite_number(i); }
```

.clang-tidy config:
```
---
Checks:
    '-*,
 readability-simplify-boolean-expr
    '
CheckOptions:
    - key: readability-simplify-boolean-expr.IgnoreMacros
      value: true
```

Produces the following:
```
1 warning generated.
test_bool_simplification.cpp:4:42: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors]
    4 | bool UseNumber(int i) { return i >= 0 && !is_a_favorite_number(i); }
      | ^~~~~~~~~~~~~~~~~~~~~~~~
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VM9v6zYM_mvoC-FAlvwjPvjQxi_ADm8bMOwcyDZta3UkQ5Lb5bK_fZDjtHlbi_byjMRRJPHjR_IjpXNq0EQVZI-Q1ZFc_GhspVX7FM_Gk3ZPKmpMd6naSeoh9qq74GxNt7TkUCLkzJLsZKMm5S-xU-d5Uv0lboyZSOqY_p4t5AxfpNVKD-gN3u5gOCPnlNEOX5Qf8SxbaxwuLtys6buxg9TAC4d-JGPpjB25WXn6ktvdL4M2lr6voIFDQwHXkQ8sIGfeLgQ52wGrgT1c339ckRR16Ml5bKUjENsh5Gz7XP9y0VGvNKFyJ3nq5bOxytNJL-eGLPD9SQEvcV0giBpEjSlHKA5QHPBtT_x_K2HrA7y8Jxeiwz8d_XpzoLTHq4_iES35xWoMGN8CBkPgOfAcgScfEAy2IB4Rivr9CNf37q70rdG9Gj7KSBzH18VhpPbJvV5DRARexMAfgB-2vc91c297h_vb7INmfkCP8YkuIL6A-qMsXgEQn-W0hFrjqouP0_H7Tf1-JOzNNJkXpT9MSfIq_YE0Wemp2wQX9HUKzE4bT9XKENiunWcQD2n48sCHrDU2LLYw7hoHW6mxoVtPBdk2l_dbB7LHzzPOD_FG18XSxatnB1n9lqc0iBV_vhKvNQm-IPv2z_vPfxIedZXoSlHKiKqkSLJkzwXbR2PVF63IGtE3_T7NUpFmXSrKVCQt5V3LRBGpijOesoztk0wkab4TsqOSp1na7EVRFj2kjM5STbtpej7vjB0i5dxCVZmk-yKaZEOTW0co52_NApyHkWqrYBQ3y-AgZZNy3r3BeOWndfjemWX1l4SML1J7F2bZ4uj9mht9m6m3wXkv_mixUzV6P6-txI_Aj4Py49LsWnMGfgwkt594tuYvaj3w4xq4A35cY_83AAD__07z9BI">