Skip to content

Commit 2c20ea4

Browse files
committed
[clang][modules] Fix crash after abcf7ce
1 parent 1ada03a commit 2c20ea4

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
@@ -803,7 +803,7 @@ Module *ModuleMap::findModule(StringRef Name) const {
803803
if (Known != Modules.end()) {
804804
Module *M = Known->getValue();
805805
// Notify callbacks that we found a module map for the module.
806-
if (!M->DefinitionLoc.isInvalid())
806+
if (M->DefinitionLoc.isValid() && !M->IsFromModuleFile)
807807
for (const auto &Cb : Callbacks)
808808
Cb->moduleMapFoundForModule(
809809
**getContainingModuleMapFile(M), M,

0 commit comments

Comments
 (0)