[clang] [C++][Modules] Import declaration should in global module fragment, module interface or module implementation (PR #164106)
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 18 21:42:55 PDT 2025
https://github.com/hubert-reinterpretcast commented:
I am unaware of any such restriction.
An _pp-import_ is a _control-line_, which is in turn a _group-part_.
A _preprocessing-file_ can directly contain a _group_ with being a _module-file_.
There _is_ a restriction on _pp-global-module-fragment_s: at the start of phase 4, they can contain neither a _pp-import_ nor a _text-line_.
https://github.com/llvm/llvm-project/pull/164106
More information about the cfe-commits
mailing list