Ideally you wouldn't use that extension at all because clang silently doesn't emit object files for it, requiring -x c++. But if you think that is important, at the very least it should only be done for actual modules. https://github.com/mathstuf/cxx-modules-sandbox/blob/master/link-use/use.mpp is particularly incorrect because currently main() isn't allowed to be defined inside of a module.