ChuanqiXu added a comment. [module.import]p1 says:
> In a module unit, all module-import-declarations and export-declarations > exporting module-import-declarations shall appear before all other > declarations in the declaration-seq of the translation-unit and of the > private-module-fragment (if any). So the following case is invalid: //--- b.hpp void func() {} import a; //--- c.cpp module; #include "b.hpp" export module c; I feel we'd better to address such cases in the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140927/new/ https://reviews.llvm.org/D140927 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits