Skip to content

Commit e45ae8a

Browse files
committed
clang_tu: set RecoveryAST & RecoveryASTType
1 parent 88a1da9 commit e45ae8a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/clang_tu.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ buildCompilerInvocation(const std::string &main, std::vector<const char *> args,
157157
// Enable IndexFrontendAction::shouldSkipFunctionBody.
158158
ci->getFrontendOpts().SkipFunctionBodies = true;
159159
ci->getLangOpts()->SpellChecking = false;
160+
#if LLVM_VERSION_MAJOR >= 11
161+
ci->getLangOpts()->RecoveryAST = true;
162+
ci->getLangOpts()->RecoveryASTType = true;
163+
#endif
160164
auto &isec = ci->getFrontendOpts().Inputs;
161165
if (isec.size())
162166
isec[0] = FrontendInputFile(main, isec[0].getKind(), isec[0].isSystem());

0 commit comments

Comments
 (0)