forked from OSchip/llvm-project
[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 in638c673a8c
and4445135109
.
This commit is contained in:
parent
6f5c685839
commit
28fa77feeb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue