[PATCH] D32111: [modules] Attempt to fix PR31905 - #include "stddef.h" breaks module map search paths; causes redefinitions.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 23 14:18:31 PST 2018


rsmith added inline comments.


================
Comment at: lib/Serialization/ASTReader.cpp:2554-2556
+      Module *M = PP.getHeaderSearchInfo().lookupModule(
+          F.ModuleName,
+          /*AllowSearch*/ true, /*SearchTopLevelOnly*/ true);
----------------
This is only trying to catch the case where we've already loaded a module map for the module and the two conflict. We should just set `AllowSearch` to `false` here. If we want to also perform validation on the case where we load the module map after importing another definition, that should be handled if/when we load the module map.


https://reviews.llvm.org/D32111





More information about the cfe-commits mailing list