[clang-tools-extra] r325491 - [clangd] Attach more information about Sema completion to traces
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 19 04:35:57 PST 2018
Author: ibiryukov
Date: Mon Feb 19 04:35:57 2018
New Revision: 325491
URL: http://llvm.org/viewvc/llvm-project?rev=325491&view=rev
Log:
[clangd] Attach more information about Sema completion to traces
Reviewers: hokein, ioeric, sammccall
Reviewed By: sammccall
Subscribers: klimek, cfe-commits, jkorous-apple
Differential Revision: https://reviews.llvm.org/D43377
Modified:
clang-tools-extra/trunk/clangd/CodeComplete.cpp
Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/CodeComplete.cpp?rev=325491&r1=325490&r2=325491&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/CodeComplete.cpp (original)
+++ clang-tools-extra/trunk/clangd/CodeComplete.cpp Mon Feb 19 04:35:57 2018
@@ -855,9 +855,12 @@ public:
CompletionList Output;
semaCodeComplete(std::move(RecorderOwner), Opts.getClangCompleteOpts(),
SemaCCInput, [&] {
- if (Recorder.CCSema)
+ if (Recorder.CCSema) {
Output = runWithSema();
- else
+ SPAN_ATTACH(
+ Tracer, "sema_completion_kind",
+ getCompletionKindString(Recorder.CCContext.getKind()));
+ } else
log("Code complete: no Sema callback, 0 results");
});
More information about the cfe-commits
mailing list