<div class="__aliyun_email_body_block"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Hi,</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">   Recently I am developing C++20 semantics in clang. Then I met an interesting bug in </span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">compare-modules-cxx2a.cpp (https://github.com/llvm/llvm-project/blob/main/clang/test/SemaCXX/compare-modules-cxx2a.cpp).</span></div><div  style="clear:both;">   </div><div  style="clear:both;">    The key point here is that the test uses `-std=c++2a` and `-fmodules` both. So my codes which is intended to work for C++20 module now tests for clang module. So here is the reason for the bug.</div><div  style="clear:both;"><br ></div><div  style="clear:both;">    Beyond my personal work, it is weired for me that we could use clang module and c++20 module at the same time. (I know the implementation of c++20 is based on clang module). </div><div  style="clear:both;">So I want to ask: do we have considered the case that we use clang module and c++20 module together? Is it neceesary? And what's the status after the user enable c++20 module and clang module?</div><div  style="clear:both;"><br ></div><div  style="clear:both;">    For example, when we enter "<span  style="color:#121416;font-family:Helvetica;font-size:14.0px;">clang -std=c++20 -fprebuilt-module-path=%t %s -c" to the command line, both `getLangOpts().</span><span  style="color:#121416;font-family:Helvetica;font-size:14.0px;"></span><span  style="color:#121416;font-family:Helvetica;font-size:14.0px;">CPlusPlusModules` and `getLangOpts().Modules` would evaluate to true, which is really weired.</span></div><div  style="clear:both;"><span  style="color:#121416;font-family:Helvetica;font-size:14.0px;">Is it intentional? Or is it a bug simply? Now I couldn't avoid the bug by `if (<span  style="margin:.0px;padding:.0px;border:.0px;outline:.0px;font-size:14.0px;font-style:normal;font-variant-caps:normal;font-weight:normal;text-align:start;text-indent:.0px;text-transform:none;text-decoration:none;color:#121416;font-family:Helvetica;">getLangOpts().</span><span  style="margin:.0px;padding:.0px;border:.0px;outline:.0px;font-size:14.0px;font-style:normal;font-variant-caps:normal;font-weight:normal;text-align:start;text-indent:.0px;text-transform:none;text-decoration:none;color:#121416;font-family:Helvetica;">CPlusPlusModules && !<span  style="caret-color:#121416;color:#121416;font-family:Helvetica;font-size:14.0px;font-style:normal;font-variant-caps:normal;font-weight:normal;text-align:start;text-indent:.0px;text-transform:none;background-color:#ffffff;text-decoration:none;float:none;display:inline;">getLangOpts().Modules</span></span>)`.</span></div><div  style="clear:both;"><span  style="color:#121416;font-family:Helvetica;font-size:14.0px;"><br ></span></div><div  style="clear:both;"><span  style="color:#121416;font-family:Helvetica;font-size:14.0px;">    I CCed people who looks like interested and related. Remind me if you feel uncomfortable.</span></div><div  style="clear:both;"><span  style="color:#121416;font-family:Helvetica;font-size:14.0px;"><br ></span></div><div  style="clear:both;"><span  style="color:#121416;font-family:Helvetica;font-size:14.0px;">Thanks,</span></div><div  style="clear:both;"><span  style="color:#121416;font-family:Helvetica;font-size:14.0px;">Chuanqi</span></div></div>