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

    <tr>
        <th>Summary</th>
        <td>
            Building in C++20 while ensuring C++17 compatibility
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            c++20,
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    We are soon planning to migrate from `C++17` to `C++20` but for the initial few weeks after we switch, we want the build/CI to be `C++17` compatible which would allow us to do rollback.

I would imagine using `-Wpre-c++20-compat` with `--std=c++20` would solve the purpose. But the flag doesn't warn on all C++20 features (incompatible with C++17) : like concepts, consteval, requires clause, coroutines, etc.

I am trying to understand the purpose of the warning `-Wpre-c++20-compat`. If we think we should be issuing this warning for all C++20 features, I could go ahead and add them. If not, I might have misunderstood the semantics of the flag.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEk8Fu8ygQx58GX0aJHHDc5OBD0ypSn-A7Yxib2WLIwlBv336F06-Ndlfaiy2YYf7z-w_onGkOiIM4XsTxtdGFXUxDyX-dj80Y7efwC0EnhBxjgJvXIVCYgSMsNCfNCFOKC4i-fRHyIuTl8CT6tsZ_tmRbt8bCMMUE7BAoEJP2MOEKK-J7Bj0xJlgR8kpsnJAvdbHqwNuBsZC3Ql5f3mrpEf8laOJy00yjR1gdGQdrLN6C9j6uUHI9ZSOk6P2ozftetK-ifb5_375yadEzBYSSK6Ho292vW8Kd-Q2xu2tUtZXYbRm7zFaoV_MIeq-Wo__ArfdbSbeYcQ-XcoeZvJ7BRsxByCeGVacAMdRe4dsxmFBzSZhByBOFR7yq_cMuzyDUM3h6RzAxGLxxru6ZGDLjh_Z1kfDPQrWY8bpkvMdTLEwBt2xk8w9P9AKcPr9mXYLFlFkH-0gEcdqWFeD_LNvD21Qnyo7C-zZnt9k0IlDOZdNxlL9r1Zvy34bUdt_AbKfnCNqhtlA703brbtmkQuR74kKzY3D6A2Gh_AUS4x0k46IDk8m_Uepo9o0dlD2rs25wOPSnvj0ej-eucYOWnVXK6nY62ZNRCttJK_l0Mu2h69GcGhpkK1Xbt_1Bdr3q9kZNRtpJ2W4053NvRdfiosnvvf9Y9jHNTaXHoVeH7th4PaLP21OU8udOSSnkS93xOsxCPU8pBsZga-D42qShFtuNZc6iaz1lzj_lmdjjcKnPp9pK4cHR1ZFHwJBLqrHvO_X9mMgTfzYl-cEx37JQz0JehbzOxK6MexMXIa9V6uu3u6X4BxoW8rphZSGvG9nfAQAA__8b82lY">