Skip to content

Commit

Permalink
clang_tu: set RecoveryAST & RecoveryASTType
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Aug 30, 2020
1 parent 55c0d5b commit 20a9f7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/clang_tu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ buildCompilerInvocation(const std::string &main, std::vector<const char *> args,
// Enable IndexFrontendAction::shouldSkipFunctionBody.
ci->getFrontendOpts().SkipFunctionBodies = true;
ci->getLangOpts()->SpellChecking = false;
#if LLVM_VERSION_MAJOR >= 11
ci->getLangOpts()->RecoveryAST = true;
ci->getLangOpts()->RecoveryASTType = true;
#endif
auto &isec = ci->getFrontendOpts().Inputs;
if (isec.size())
isec[0] = FrontendInputFile(main, isec[0].getKind(), isec[0].isSystem());
Expand Down

0 comments on commit 20a9f7b

Please sign in to comment.