[clang] [clang][Modules] Diagnosing Module Redefinition Across ModuleMaps (PR #190085)

Cyndy Ishida via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 7 09:19:33 PDT 2026


================
@@ -607,6 +605,12 @@ bool CompilerInstanceWithContext::computeDependencies(
   if (!ModResult)
     return false;
 
+  // Check for errors that occurred as side effects during module loading
+  // (e.g., modulemap parsing errors like duplicate module definitions).
+  // loadModule may return a valid module even when such errors occur.
----------------
cyndyishida wrote:

I don't feel that strongly, but I think this code is already self-explanatory. 

https://github.com/llvm/llvm-project/pull/190085


More information about the cfe-commits mailing list