Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/Protocol.cpp')
-rw-r--r--clang-tools-extra/clangd/Protocol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/Protocol.cpp b/clang-tools-extra/clangd/Protocol.cpp
index 01127fa9ae9e..ab75faaf9858 100644
--- a/clang-tools-extra/clangd/Protocol.cpp
+++ b/clang-tools-extra/clangd/Protocol.cpp
@@ -1444,8 +1444,8 @@ llvm::json::Value toJSON(const FoldingRange &Range) {
Result["startCharacter"] = Range.startCharacter;
if (Range.endCharacter)
Result["endCharacter"] = Range.endCharacter;
- if (Range.kind)
- Result["kind"] = *Range.kind;
+ if (!Range.kind.empty())
+ Result["kind"] = Range.kind;
return Result;
}