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

    <tr>
        <th>Summary</th>
        <td>
            Disambiguate Clang modules and C++20 modules
        </td>
    </tr>

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

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

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

<pre>
    Due to historical reasons, the meaning of the word 'Modules' in the context of clang is ambiguous. It might refer to OC modules, Clang C++ modules, C++ modules TS and C++20 modules in different context. We lack a clear and formal documentation to explain their relationships and differences.

Concretely,  there are some problems we've found:
1. LangOptions::Modules would be true if either modules mode are enabled. So if the policy is to support clang C++ modules together or this is just an oversight.
2. What is -fcxx-modules mean? Does it mean C++20 modules? Or does it mean Clang C++ modules? (We found this in https://reviews.llvm.org/D120540#inline-1214099)

Given we are implementing C++20 modules, the ambiguity matters more. Clearness is always better than unclearness.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtVE2PmzAQ_TVwsYLAhBAOHHaJtqrUag9bqb0aGMBbY1N_5OPfd-yQ7G67AoLseTN-896QVvWX-uCAWEUmbqzSvGOCaGBGSRPRhtgJyAxMcjkSNYTlSemeRLT8rnonAFEl4TJEOiUtnK0HdoJhBjeEzS0fnXImIV8tmfk4Waw_gPZnPjdkvlVpSBNymog-4v0h8HGL_HghTPa3bZreA8ij5wMWB2lvbBLyE4hg3W_CkBUwHXIHpWfstFedmxHMLFfSM4LzIti1Ha6RqAgRM_HFhLxb-Q5MEqWHKH24_jZKdhosiIsn7NM1EIaPUTOQRatWwGzICVCuI-DxTvZRviZnCfmGrT8v4Sy_nT-s6qLaTvSkRYs0-sQHAtwXv7eM7-tBIBme0SfkRXmY92NRgncX7wJ2ZtyyKG1XZ_6V1KoRQl2FxuAo-KRXZyw2TdQRtPHGrR1TlHRi1kM2Q3c-b-5ccFCi_IkclPfChvX_LnnEs0bp34M-tR6BEd3_XOVaeUkyWbsElegT3hqOHE4mEeI4J0qPuHXIaFps04jmXAouYZPRbJtWVUSr95594UeQaEmQj88LOoSjwN-IvOO8fgrXaeb2QmZmLcqCAA0J8sfBkmCCbkyc2MWgZx6Badifk90NkcR9nfdVXrHYciugPnBzLcssrELcBP10ymOnRf1RgxFnwrVJp2ZceCHW1wYH7xU6i0tujPN9PBXFvsriqWaQb3dQFinLdmy_33ewrXbQd6xsK0qrNBasBWHqqHiMikPMa5pSmu7wKrNsu0_ydkgzgF1ZZkPRlnm0TWFmXNyNiHUdOLRuNBgU-P_y5lLMDI6UBLjVZ85OStfN5Jj8w3-5Kg6M60D3L4E0jPQ">