cor3ntin added inline comments.
================ Comment at: clang/lib/Sema/SemaModule.cpp:282 + StringRef FirstComponentName = Path[0].first->getName(); + if (!getSourceManager().isInSystemHeader(Path[0].second) && + (FirstComponentName == "std" || ---------------- ChuanqiXu wrote: > std modules should be irreverent with system headers; The intuition of the > wording should be that the users can't declare modules like `std` or > `std.compat` to avoid possible conflicting. The approach I imaged may be add > a new compilation flags (call it `-fstd-modules`) now. And if the compiler > found a `std` module declaration without `-fstd-modules`, emit an error. > > For now, I think we can skip the check for `-fstd-modules` and add it back > when we starts to support std modules actually. The idea is that standard modules are built from system directories... it seems a better heuristic than adding a flag for the purpose of 1 diagnostics ( maybe some other system library could in theory export std with no warning, but I'm not super worried about that being a concern in practice) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136953/new/ https://reviews.llvm.org/D136953 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits