[PATCH] D52976: [clangd] Update the out-of-date yaml-symbol-file flag in clangd.
This revision was automatically updated to reflect the committed changes. Closed by commit rL343963: [clangd] Update the out-of-date yaml-symbol-file flag in clangd. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52976 Files: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp === --- clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp +++ clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp @@ -158,11 +158,11 @@ "an include line will be inserted or not."), llvm::cl::init(true)); -static llvm::cl::opt YamlSymbolFile( -"yaml-symbol-file", +static llvm::cl::opt IndexFile( +"index-file", llvm::cl::desc( -"YAML-format global symbol file to build the static index. Clangd will " -"use the static index for global code completion.\n" +"Index file to build the static index. The file must have been created " +"by a compatible clangd-index.\n" "WARNING: This option is experimental only, and will be removed " "eventually. Don't rely on it."), llvm::cl::init(""), llvm::cl::Hidden); @@ -288,12 +288,12 @@ Opts.BuildDynamicSymbolIndex = EnableIndex; std::unique_ptr StaticIdx; std::future AsyncIndexLoad; // Block exit while loading the index. - if (EnableIndex && !YamlSymbolFile.empty()) { + if (EnableIndex && !IndexFile.empty()) { // Load the index asynchronously. Meanwhile SwapIndex returns no results. SwapIndex *Placeholder; StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique())); AsyncIndexLoad = runAsync([Placeholder, ] { - if (auto Idx = loadIndex(YamlSymbolFile, Opts.URISchemes, UseDex)) + if (auto Idx = loadIndex(IndexFile, Opts.URISchemes, UseDex)) Placeholder->reset(std::move(Idx)); }); if (RunSynchronously) Index: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp === --- clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp +++ clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp @@ -158,11 +158,11 @@ "an include line will be inserted or not."), llvm::cl::init(true)); -static llvm::cl::opt YamlSymbolFile( -"yaml-symbol-file", +static llvm::cl::opt IndexFile( +"index-file", llvm::cl::desc( -"YAML-format global symbol file to build the static index. Clangd will " -"use the static index for global code completion.\n" +"Index file to build the static index. The file must have been created " +"by a compatible clangd-index.\n" "WARNING: This option is experimental only, and will be removed " "eventually. Don't rely on it."), llvm::cl::init(""), llvm::cl::Hidden); @@ -288,12 +288,12 @@ Opts.BuildDynamicSymbolIndex = EnableIndex; std::unique_ptr StaticIdx; std::future AsyncIndexLoad; // Block exit while loading the index. - if (EnableIndex && !YamlSymbolFile.empty()) { + if (EnableIndex && !IndexFile.empty()) { // Load the index asynchronously. Meanwhile SwapIndex returns no results. SwapIndex *Placeholder; StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique())); AsyncIndexLoad = runAsync([Placeholder, ] { - if (auto Idx = loadIndex(YamlSymbolFile, Opts.URISchemes, UseDex)) + if (auto Idx = loadIndex(IndexFile, Opts.URISchemes, UseDex)) Placeholder->reset(std::move(Idx)); }); if (RunSynchronously) ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52976: [clangd] Update the out-of-date yaml-symbol-file flag in clangd.
hokein updated this revision to Diff 168639. hokein added a comment. address comment. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52976 Files: clangd/tool/ClangdMain.cpp Index: clangd/tool/ClangdMain.cpp === --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -158,11 +158,11 @@ "an include line will be inserted or not."), llvm::cl::init(true)); -static llvm::cl::opt YamlSymbolFile( -"yaml-symbol-file", +static llvm::cl::opt IndexFile( +"index-file", llvm::cl::desc( -"YAML-format global symbol file to build the static index. Clangd will " -"use the static index for global code completion.\n" +"Index file to build the static index. The file must have been created " +"by a compatible clangd-index.\n" "WARNING: This option is experimental only, and will be removed " "eventually. Don't rely on it."), llvm::cl::init(""), llvm::cl::Hidden); @@ -288,12 +288,12 @@ Opts.BuildDynamicSymbolIndex = EnableIndex; std::unique_ptr StaticIdx; std::future AsyncIndexLoad; // Block exit while loading the index. - if (EnableIndex && !YamlSymbolFile.empty()) { + if (EnableIndex && !IndexFile.empty()) { // Load the index asynchronously. Meanwhile SwapIndex returns no results. SwapIndex *Placeholder; StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique())); AsyncIndexLoad = runAsync([Placeholder, ] { - if (auto Idx = loadIndex(YamlSymbolFile, Opts.URISchemes, UseDex)) + if (auto Idx = loadIndex(IndexFile, Opts.URISchemes, UseDex)) Placeholder->reset(std::move(Idx)); }); if (RunSynchronously) Index: clangd/tool/ClangdMain.cpp === --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -158,11 +158,11 @@ "an include line will be inserted or not."), llvm::cl::init(true)); -static llvm::cl::opt YamlSymbolFile( -"yaml-symbol-file", +static llvm::cl::opt IndexFile( +"index-file", llvm::cl::desc( -"YAML-format global symbol file to build the static index. Clangd will " -"use the static index for global code completion.\n" +"Index file to build the static index. The file must have been created " +"by a compatible clangd-index.\n" "WARNING: This option is experimental only, and will be removed " "eventually. Don't rely on it."), llvm::cl::init(""), llvm::cl::Hidden); @@ -288,12 +288,12 @@ Opts.BuildDynamicSymbolIndex = EnableIndex; std::unique_ptr StaticIdx; std::future AsyncIndexLoad; // Block exit while loading the index. - if (EnableIndex && !YamlSymbolFile.empty()) { + if (EnableIndex && !IndexFile.empty()) { // Load the index asynchronously. Meanwhile SwapIndex returns no results. SwapIndex *Placeholder; StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique())); AsyncIndexLoad = runAsync([Placeholder, ] { - if (auto Idx = loadIndex(YamlSymbolFile, Opts.URISchemes, UseDex)) + if (auto Idx = loadIndex(IndexFile, Opts.URISchemes, UseDex)) Placeholder->reset(std::move(Idx)); }); if (RunSynchronously) ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52976: [clangd] Update the out-of-date yaml-symbol-file flag in clangd.
hokein added a comment. In https://reviews.llvm.org/D52976#1257614, @sammccall wrote: > Hmm, I wonder if we should remove "experimental" text and the hidden bit. Or > wait to see if we want to move to automatic index entirely? Our plan seems unclear at the moment, so I would suggest not doing it now until we sort them out. > May want to mention "must have been created by a compatible clangd-indexer". Done. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52976: [clangd] Update the out-of-date yaml-symbol-file flag in clangd.
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Hmm, I wonder if we should remove "experimental" text and the hidden bit. Or wait to see if we want to move to automatic index entirely? May want to mention "must have been created by a compatible clangd-indexer". Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52976: [clangd] Update the out-of-date yaml-symbol-file flag in clangd.
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. The flag is stale due to the recent changes of clangd indexer, this patch rename it to "index-file". Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52976 Files: clangd/tool/ClangdMain.cpp Index: clangd/tool/ClangdMain.cpp === --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -158,11 +158,10 @@ "an include line will be inserted or not."), llvm::cl::init(true)); -static llvm::cl::opt YamlSymbolFile( -"yaml-symbol-file", +static llvm::cl::opt IndexFile( +"index-file", llvm::cl::desc( -"YAML-format global symbol file to build the static index. Clangd will " -"use the static index for global code completion.\n" +"Index file to build the static index.\n" "WARNING: This option is experimental only, and will be removed " "eventually. Don't rely on it."), llvm::cl::init(""), llvm::cl::Hidden); @@ -288,12 +287,12 @@ Opts.BuildDynamicSymbolIndex = EnableIndex; std::unique_ptr StaticIdx; std::future AsyncIndexLoad; // Block exit while loading the index. - if (EnableIndex && !YamlSymbolFile.empty()) { + if (EnableIndex && !IndexFile.empty()) { // Load the index asynchronously. Meanwhile SwapIndex returns no results. SwapIndex *Placeholder; StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique())); AsyncIndexLoad = runAsync([Placeholder, ] { - if (auto Idx = loadIndex(YamlSymbolFile, Opts.URISchemes, UseDex)) + if (auto Idx = loadIndex(IndexFile, Opts.URISchemes, UseDex)) Placeholder->reset(std::move(Idx)); }); if (RunSynchronously) Index: clangd/tool/ClangdMain.cpp === --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -158,11 +158,10 @@ "an include line will be inserted or not."), llvm::cl::init(true)); -static llvm::cl::opt YamlSymbolFile( -"yaml-symbol-file", +static llvm::cl::opt IndexFile( +"index-file", llvm::cl::desc( -"YAML-format global symbol file to build the static index. Clangd will " -"use the static index for global code completion.\n" +"Index file to build the static index.\n" "WARNING: This option is experimental only, and will be removed " "eventually. Don't rely on it."), llvm::cl::init(""), llvm::cl::Hidden); @@ -288,12 +287,12 @@ Opts.BuildDynamicSymbolIndex = EnableIndex; std::unique_ptr StaticIdx; std::future AsyncIndexLoad; // Block exit while loading the index. - if (EnableIndex && !YamlSymbolFile.empty()) { + if (EnableIndex && !IndexFile.empty()) { // Load the index asynchronously. Meanwhile SwapIndex returns no results. SwapIndex *Placeholder; StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique())); AsyncIndexLoad = runAsync([Placeholder, ] { - if (auto Idx = loadIndex(YamlSymbolFile, Opts.URISchemes, UseDex)) + if (auto Idx = loadIndex(IndexFile, Opts.URISchemes, UseDex)) Placeholder->reset(std::move(Idx)); }); if (RunSynchronously) ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits