mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 17:11:59 +00:00
If clang >= 10, don't crash on #pragma clang __debug
This commit is contained in:
parent
125915e254
commit
aa4d2d1b43
@ -159,6 +159,9 @@ buildCompilerInvocation(const std::string &main, std::vector<const char *> args,
|
|||||||
auto &isec = ci->getFrontendOpts().Inputs;
|
auto &isec = ci->getFrontendOpts().Inputs;
|
||||||
if (isec.size())
|
if (isec.size())
|
||||||
isec[0] = FrontendInputFile(main, isec[0].getKind(), isec[0].isSystem());
|
isec[0] = FrontendInputFile(main, isec[0].getKind(), isec[0].isSystem());
|
||||||
|
#if LLVM_VERSION_MAJOR >= 10 // llvmorg-11-init-2414-g75f09b54429
|
||||||
|
ci->getPreprocessorOpts().DisablePragmaDebugCrash = true;
|
||||||
|
#endif
|
||||||
// clangSerialization has an unstable format. Disable PCH reading/writing
|
// clangSerialization has an unstable format. Disable PCH reading/writing
|
||||||
// to work around PCH mismatch problems.
|
// to work around PCH mismatch problems.
|
||||||
ci->getPreprocessorOpts().ImplicitPCHInclude.clear();
|
ci->getPreprocessorOpts().ImplicitPCHInclude.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user