summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-10-31 16:44:32 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-10-31 16:44:32 +0000
commit06e8d69ac7ae98f239dd66819477e3bbf245c4ac (patch)
treeca8d422157f04be41eacc4bc08ef632d2678e929 /clang/lib/Frontend/ASTUnit.cpp
parentd92da47707d8064fd64c2e869ed284182e927522 (diff)
downloadbcm5719-llvm-06e8d69ac7ae98f239dd66819477e3bbf245c4ac.tar.gz
bcm5719-llvm-06e8d69ac7ae98f239dd66819477e3bbf245c4ac.zip
[libclang] Disable spell-checking and warnings during code-completion since they are not needed.
llvm-svn: 220966
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index bd81c0d60a5..c7d3d3f4c43 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -2326,6 +2326,10 @@ void ASTUnit::CodeComplete(StringRef File, unsigned Line, unsigned Column,
// Set the language options appropriately.
LangOpts = *CCInvocation->getLangOpts();
+ // Spell-checking and warnings are wasteful during code-completion.
+ LangOpts.SpellChecking = false;
+ CCInvocation->getDiagnosticOpts().IgnoreWarnings = true;
+
std::unique_ptr<CompilerInstance> Clang(new CompilerInstance());
// Recover resources if we crash before exiting this method.
OpenPOWER on IntegriCloud