[clang-tools-extra] r336173 - [clangd] Remove CompletionItem::SymbolScope extension.
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 3 00:21:15 PDT 2018
Author: sammccall
Date: Tue Jul 3 00:21:15 2018
New Revision: 336173
URL: http://llvm.org/viewvc/llvm-project?rev=336173&view=rev
Log:
[clangd] Remove CompletionItem::SymbolScope extension.
This was never serialized, and embedders now have access to the
CodeCompletion API, which includes this information.
Modified:
clang-tools-extra/trunk/clangd/CodeComplete.cpp
clang-tools-extra/trunk/clangd/Protocol.h
clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp
Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/CodeComplete.cpp?rev=336173&r1=336172&r2=336173&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/CodeComplete.cpp (original)
+++ clang-tools-extra/trunk/clangd/CodeComplete.cpp Tue Jul 3 00:21:15 2018
@@ -1244,7 +1244,6 @@ CompletionItem CodeCompletion::render(co
: InsertTextFormat::PlainText;
if (HeaderInsertion)
LSP.additionalTextEdits = {*HeaderInsertion};
- LSP.SymbolScope = Scope;
return LSP;
}
Modified: clang-tools-extra/trunk/clangd/Protocol.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Protocol.h?rev=336173&r1=336172&r2=336173&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Protocol.h (original)
+++ clang-tools-extra/trunk/clangd/Protocol.h Tue Jul 3 00:21:15 2018
@@ -717,12 +717,6 @@ struct CompletionItem {
//
// data?: any - A data entry field that is preserved on a completion item
// between a completion and a completion resolve request.
-
- // C++ extension that is only expected to be used by users of ClangdServer's
- // C++ API. Not serialized from/to json.
- /// The containing scope (e.g. namespace) of the symbol this item corresponds
- /// to, e.g. "" (global scope), "ns::" (top-level namespace).
- std::string SymbolScope;
};
json::Expr toJSON(const CompletionItem &);
llvm::raw_ostream &operator<<(llvm::raw_ostream &, const CompletionItem &);
Modified: clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp?rev=336173&r1=336172&r2=336173&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp Tue Jul 3 00:21:15 2018
@@ -1266,7 +1266,6 @@ TEST(CompletionTest, Render) {
EXPECT_EQ(R.detail, "int\n\"foo.h\"");
EXPECT_EQ(R.documentation, "This is x().");
EXPECT_THAT(R.additionalTextEdits, IsEmpty());
- EXPECT_EQ(R.SymbolScope, "ns::Foo::");
EXPECT_EQ(R.sortText, sortText(1.0, "x"));
Opts.EnableSnippets = true;
More information about the cfe-commits
mailing list