r208259 - fmodules-search-all: Removed dead code and added some comments.

John Thompson John.Thompson.JTSoftware at gmail.com
Wed May 7 15:47:08 PDT 2014


Author: jtsoftware
Date: Wed May  7 17:47:08 2014
New Revision: 208259

URL: http://llvm.org/viewvc/llvm-project?rev=208259&view=rev
Log:
fmodules-search-all: Removed dead code and added some comments.

Modified:
    cfe/trunk/lib/Sema/SemaLookup.cpp

Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=208259&r1=208258&r2=208259&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Wed May  7 17:47:08 2014
@@ -3982,14 +3982,13 @@ TypoCorrection Sema::CorrectTypo(const D
 
   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);





More information about the cfe-commits mailing list