Bigcheese 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). https://github.com/llvm/llvm-project/pull/107168 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits