[llvm-branch-commits] [cfe-branch] r115936 - /cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp

Daniel Dunbar daniel at zuster.org
Thu Oct 7 11:16:44 PDT 2010


Author: ddunbar
Date: Thu Oct  7 13:16:44 2010
New Revision: 115936

URL: http://llvm.org/viewvc/llvm-project?rev=115936&view=rev
Log:
Merge r115931:
--
Author: Douglas Gregor <dgregor at apple.com>
Date:   Thu Oct 7 18:03:24 2010 +0000

    Don't force spell checking when code-completing. Let the client decide

Modified:
    cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp

Modified: cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp?rev=115936&r1=115935&r2=115936&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp Thu Oct  7 13:16:44 2010
@@ -1790,11 +1790,6 @@
   FrontendOpts.CodeCompletionAt.Line = Line;
   FrontendOpts.CodeCompletionAt.Column = Column;
 
-  // Turn on spell-checking when performing code completion. It leads
-  // to better results.
-  unsigned SpellChecking = CCInvocation.getLangOpts().SpellChecking;
-  CCInvocation.getLangOpts().SpellChecking = 1;
-
   // Set the language options appropriately.
   LangOpts = CCInvocation.getLangOpts();
 
@@ -1813,7 +1808,6 @@
                                                Clang.getTargetOpts()));
   if (!Clang.hasTarget()) {
     Clang.takeInvocation();
-    CCInvocation.getLangOpts().SpellChecking = SpellChecking;
     return;
   }
   
@@ -1910,7 +1904,6 @@
   Clang.takeSourceManager();
   Clang.takeInvocation();
   Clang.takeCodeCompletionConsumer();
-  CCInvocation.getLangOpts().SpellChecking = SpellChecking;
 }
 
 bool ASTUnit::Save(llvm::StringRef File) {





More information about the llvm-branch-commits mailing list