[clang][modules] Avoid using uninitialized SourceLocation

At this point, `F.ImportLoc` has not been initialized by the `ASTReader` yet and using it leads to an assertion failure.

Introduced in 638c673a8c and 4445135109.
This commit is contained in:
Jan Svoboda 2021-10-13 11:23:46 +02:00
parent 6f5c685839
commit 28fa77feeb
1 changed files with 1 additions and 1 deletions

View File

@ -2924,7 +2924,7 @@ ASTReader::ReadControlBlock(ModuleFile &F,
// If we've already loaded a module map file covering this module, we may
// have a better path for it (relative to the current build).
Module *M = PP.getHeaderSearchInfo().lookupModule(
F.ModuleName, F.ImportLoc, /*AllowSearch*/ true,
F.ModuleName, SourceLocation(), /*AllowSearch*/ true,
/*AllowExtraModuleMapSearch*/ true);
if (M && M->Directory) {
// If we're implicitly loading a module, the base directory can't