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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] LLVM 16 will promote suppressed warnings to errors when C++20 is enabled
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    Repro:
```
$ cat a.cpp
#define A 1
#define A

void _()
{
    int i = 42;
    int ii, iii;
}

$ clang-tidy-16 a.cpp --checks=-*,readability-isolate-declaration --warnings-as-errors=* -- -std=c++17  -Wno-macro-redefined
1 warning generated.
D:\repro\a.cpp:7:5: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
    int ii, iii;
 ^~~~~~~~~~~~
1 warning treated as error

$ clang-tidy-16 a.cpp --checks=-*,readability-isolate-declaration --warnings-as-errors=* -- -std=c++20 -Wno-macro-redefined
2 warnings generated.
D:\repro\a.cpp:2:9: error: 'A' macro redefined [clang-diagnostic-macro-redefined,-warnings-as-errors]
#define A
 ^
D:\repro\a.cpp:1:9: note: previous definition is here
#define A 1
        ^
D:\repro\a.cpp:7:5: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
    int ii, iii;
 ^~~~~~~~~~~~
2 warnings treated as errors

$ clang-tidy-15 a.cpp --checks=-*,readability-isolate-declaration --warnings-as-errors=* -- -std=c++20 -Wno-macro-redefined
2 warnings generated.
D:\repro\a.cpp:7:5: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
    int ii, iii;
 ^~~~~~~~~~~~
Suppressed 1 warnings (1 with check filters).
1 warning treated as error

$ clang-tidy-15 a.cpp --checks=-*,readability-isolate-declaration --warnings-as-errors=* -- -std=c++17 -Wno-macro-redefined
1 warning generated.
D:\repro\a.cpp:7:5: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
    int ii, iii;
 ^~~~~~~~~~~~
1 warning treated as error
```

I see that there are other similar issues, but none of them mentions C++20:
#61520, #59588, and #59589

Will the fix proposed in https://reviews.llvm.org/D146520 also work here? Or is this something else?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVk-PqzYQ_zTOZURkzJ-EQw5saKRKr6rUSn3HyuAJTJ-xkW023Us_e2WSbPJ2291WlVqtVITA2GD__swMlt5TbxB3rHhgRbOScxis2wWSvR1lJx1Zv2qtetr9gJOzLKsZbxivWckv5_lR5NDJAHLdTdO1K1N4JINQQ_qq69KxXB8tKfiZiS0T1aV_83BuAACQCUDAsgZywbKXA8TEHojoeYRtmvvJF2Ramj4JpJ6StDxjhCTpBuy-eJY1CRM1E3uHUsmWNIWnhLzVMmCisNPSyUDWQJKcpDNkep9In6Bz1sWvmaghSSDxQbGs6Zh4YOIh3QAkn41NRtk5mzg881ZnTClcZoIeDToZUK3PI00UuNi7Retif5YzqzcsqwuW1bCsGhvjrANNGuEOoQcyIMGT6TWCDzLgiCaAQzV36OGOILDi4R2-TOz_iHDRvGcAsOKb327HS8rBYSQM0l_Y_OdmCf6GV-IK3P9VswTL6uors5jY1ExsYFkAnheIJpzZKpK9sT5Q9wrE2y68yqgo_pvo0is6YwPG--TwkezsYZmIFvXIw4AO_zSR4XK8t9jHj9s7-18Grn8rcouPGLkf364f52ly6D0qSG_0mdimcKIwwGIGHEkHdJ6Jav1PqtO_43G6-f9P8rf-JC92Jsv1W_CIEAYZIMTKBtIh2NgETyNp6YC8n9FHCO0cwFiDYI_x7REi90WV_TXtbvsgkZVpIXj8jomsqIrtNralUdfn6h7IZ9I6TgpH-hUmZycbY5UMDCFMPk4rDkwcYk3Gk19r_TiureuZODRpXhaCg9Tewsm6L-cSnR3g-wgewkAevB0xDFEc1D4OrtQuU1VWyRXu0nLLN3lZCb4adm3bibRVBRY8azdVdcy2BW5FJ3OFOSq1op3gIuM5L7ng25yvU34sym1eIK9SlfGS5RxHSfoZ5GqRcFemVVmttGxR--u20u3iS0k7957lXJMPN26rQEEvG9BbcrGigU-ffvoO0hJOUbLJ2dEGBH9L8FthtpeCDKcBzc2kqAoa2WpUq9np3dcS9xSGuV13dmTiELFcbsnk7C_YBSYO15A4LJR-DwAA___cZYm-">