Skip to content

Commit d544d8b

Browse files
committed
[clang][modules] Fix crash after abcf7ce
(cherry picked from commit 2c20ea4)
1 parent 39a2d0a commit d544d8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Lex/ModuleMap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ Module *ModuleMap::findModule(StringRef Name) const {
810810
if (Known != Modules.end()) {
811811
Module *M = Known->getValue();
812812
// Notify callbacks that we found a module map for the module.
813-
if (!M->DefinitionLoc.isInvalid())
813+
if (M->DefinitionLoc.isValid() && !M->IsFromModuleFile)
814814
for (const auto &Cb : Callbacks)
815815
Cb->moduleMapFoundForModule(
816816
**getContainingModuleMapFile(M), M,

0 commit comments

Comments
 (0)