[C++20] [Modules] Continue parsing after we found reserved module names
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Thu, 13 Apr 2023 07:08:21 +0000 (15:08 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Thu, 13 Apr 2023 07:14:34 +0000 (15:14 +0800)
commitc1f76363e0db41ab6eb9ebedd687ee098491e9b7
tree339ff0b3afe00e3a039eec53f21e4cefbb42bebf
parente4e0bf63d0b3615b9a2481be6769a3c876763ec6
[C++20] [Modules] Continue parsing after we found reserved module names

Close https://github.com/llvm/llvm-project/issues/62112

In the previous change, we'll stop parsing directly after we found
reserved module names. But this may be too aggressive. This patch
changes this. Note that the parsing will still be stopped if the module
name is `module` or `import`.
clang/lib/Sema/SemaModule.cpp
clang/test/Modules/reserved-names-1.cpp [deleted file]
clang/test/Modules/reserved-names-1.cppm [new file with mode: 0644]
clang/test/Modules/reserved-names-2.cppm [moved from clang/test/Modules/reserved-names-2.cpp with 100% similarity]
clang/test/Modules/reserved-names-3.cppm [moved from clang/test/Modules/reserved-names-3.cpp with 100% similarity]
clang/test/Modules/reserved-names-4.cppm [moved from clang/test/Modules/reserved-names-4.cpp with 100% similarity]