[clang] [clang] Diagnose config_macros before building modules (PR #83641)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 28 08:52:19 PDT 2026


================
@@ -1829,6 +1837,13 @@ ModuleLoadResult CompilerInstance::findOrCompileModuleAndReadAST(
   Module *M =
       HS.lookupModule(ModuleName, ImportLoc, true, !IsInclusionDirective);
 
+  // Check for any configuration macros that have changed. This is done
+  // immediately before potentially building a module in case this module
+  // depends on having one of its configuration macros defined to successfully
+  // build. If this is not done the user will never see the warning.
+  if (M)
----------------
shafik wrote:

ping @Bigcheese 

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


More information about the cfe-commits mailing list