From b335d96fdee1d31087895cd4eceeeba207049d2e Mon Sep 17 00:00:00 2001 From: John Thompson Date: Wed, 7 May 2014 22:47:08 +0000 Subject: [PATCH] fmodules-search-all: Removed dead code and added some comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208259 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaLookup.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index fc07e7273f..52f4c84cb8 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -3982,14 +3982,13 @@ TypoCorrection Sema::CorrectTypo(const DeclarationNameInfo &TypoName, TypoCorrectionConsumer Consumer(*this, Typo); + // If we're handling a missing symbol error, using modules, and the + // special search all modules option is used, look for a missing import. if ((Mode == CTK_ErrorRecovery) && getLangOpts().Modules && getLangOpts().ModulesSearchAll) { - if (getModuleLoader().lookupMissingImports(Typo->getName(), - TypoName.getLocStart())) { - TypoCorrection TC(TypoName.getName(), (NestedNameSpecifier *)0, 0); - TC.setCorrectionRange(SS, TypoName); - TC.setRequiresImport(true); - } + // The following has the side effect of loading the missing module. + getModuleLoader().lookupMissingImports(Typo->getName(), + TypoName.getLocStart()); } NamespaceSpecifierSet Namespaces(Context, CurContext, SS); -- 2.50.1