diff options
Diffstat (limited to 'clang-tools-extra/clangd/ConfigCompile.cpp')
-rw-r--r-- | clang-tools-extra/clangd/ConfigCompile.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/ConfigCompile.cpp b/clang-tools-extra/clangd/ConfigCompile.cpp index 18afdeb3cb5c..a606b98a2dba 100644 --- a/clang-tools-extra/clangd/ConfigCompile.cpp +++ b/clang-tools-extra/clangd/ConfigCompile.cpp @@ -197,6 +197,7 @@ struct FragmentCompiler { compile(std::move(F.Diagnostics)); compile(std::move(F.Completion)); compile(std::move(F.Hover)); + compile(std::move(F.InlayHints)); } void compile(Fragment::IfBlock &&F) { @@ -526,6 +527,22 @@ struct FragmentCompiler { } } + void compile(Fragment::InlayHintsBlock &&F) { + if (F.Enabled) + Out.Apply.push_back([Value(**F.Enabled)](const Params &, Config &C) { + C.InlayHints.Enabled = Value; + }); + if (F.ParameterNames) + Out.Apply.push_back( + [Value(**F.ParameterNames)](const Params &, Config &C) { + C.InlayHints.Parameters = Value; + }); + if (F.DeducedTypes) + Out.Apply.push_back([Value(**F.DeducedTypes)](const Params &, Config &C) { + C.InlayHints.DeducedTypes = Value; + }); + } + constexpr static llvm::SourceMgr::DiagKind Error = llvm::SourceMgr::DK_Error; constexpr static llvm::SourceMgr::DiagKind Warning = llvm::SourceMgr::DK_Warning; |