summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>2014-05-07 22:47:08 +0000
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>2014-05-07 22:47:08 +0000
commit2309b15cb0bc5d985e7e7edc67c4905eef704f3a (patch)
treeb09ba78d0386d1ad2b929770a76393358cc2d577 /clang/lib/Sema/SemaLookup.cpp
parent4434d361d05fc5c573a053428edc1e35b644df7e (diff)
downloadbcm5719-llvm-2309b15cb0bc5d985e7e7edc67c4905eef704f3a.tar.gz
bcm5719-llvm-2309b15cb0bc5d985e7e7edc67c4905eef704f3a.zip
fmodules-search-all: Removed dead code and added some comments.
llvm-svn: 208259
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index fc07e7273fc..52f4c84cb8c 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud