From 3552f66f8a42021811e8ab9d4a9dfd337df2f969 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 7 Oct 2010 18:03:24 +0000 Subject: [PATCH] Don't force spell checking when code-completing. Let the client decide git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115931 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/ASTUnit.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 9ae38b134a..2a8e40a8f8 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -1757,11 +1757,6 @@ void ASTUnit::CodeComplete(llvm::StringRef File, unsigned Line, unsigned Column, 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(); @@ -1780,7 +1775,6 @@ void ASTUnit::CodeComplete(llvm::StringRef File, unsigned Line, unsigned Column, Clang.getTargetOpts())); if (!Clang.hasTarget()) { Clang.takeInvocation(); - CCInvocation.getLangOpts().SpellChecking = SpellChecking; return; } @@ -1877,7 +1871,6 @@ void ASTUnit::CodeComplete(llvm::StringRef File, unsigned Line, unsigned Column, Clang.takeSourceManager(); Clang.takeInvocation(); Clang.takeCodeCompletionConsumer(); - CCInvocation.getLangOpts().SpellChecking = SpellChecking; } bool ASTUnit::Save(llvm::StringRef File) { -- 2.40.0