[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 10 09:23:53 PDT 2025
yronglin wrote:
> > @Bigcheese I have a question about `A module directive may only appear as the first preprocessing tokens in a file (excluding the global module fragment.)`. IIUC, as you said in [#90574 (comment)](https://github.com/llvm/llvm-project/pull/90574#discussion_r1591569547), this rule intended to prohibit the following code?
> > ```c++
> > // error: User need to have a `module;` decl before any preprocessor directives.
> > #include "foo.h"
> > export module M;
> > ```
>
> Yes, that's not valid according to to the grammar in [[cpp.pre]](https://eel.is/c++draft/cpp.pre).
Got it, thanks!
https://github.com/llvm/llvm-project/pull/107168
More information about the cfe-commits
mailing list