This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0496cf2f6a2e: [clangd] Use empty string to represent None semantics in FoldingRange::kind (authored by kadircet).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130003/new/ https://reviews.llvm.org/D130003 Files: clang-tools-extra/clangd/Protocol.cpp clang-tools-extra/clangd/Protocol.h Index: clang-tools-extra/clangd/Protocol.h =================================================================== --- clang-tools-extra/clangd/Protocol.h +++ clang-tools-extra/clangd/Protocol.h @@ -1772,7 +1772,7 @@ unsigned startCharacter; unsigned endLine = 0; unsigned endCharacter; - llvm::Optional<std::string> kind; + std::string kind; }; llvm::json::Value toJSON(const FoldingRange &Range); Index: clang-tools-extra/clangd/Protocol.cpp =================================================================== --- clang-tools-extra/clangd/Protocol.cpp +++ clang-tools-extra/clangd/Protocol.cpp @@ -1444,8 +1444,8 @@ 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; }
Index: clang-tools-extra/clangd/Protocol.h =================================================================== --- clang-tools-extra/clangd/Protocol.h +++ clang-tools-extra/clangd/Protocol.h @@ -1772,7 +1772,7 @@ unsigned startCharacter; unsigned endLine = 0; unsigned endCharacter; - llvm::Optional<std::string> kind; + std::string kind; }; llvm::json::Value toJSON(const FoldingRange &Range); Index: clang-tools-extra/clangd/Protocol.cpp =================================================================== --- clang-tools-extra/clangd/Protocol.cpp +++ clang-tools-extra/clangd/Protocol.cpp @@ -1444,8 +1444,8 @@ 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; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits