[PATCH] D43377: [clangd] Attach more information about Sema completion to traces

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 19 04:25:54 PST 2018


ilya-biryukov updated this revision to Diff 134889.
ilya-biryukov added a comment.

- Rename usage of printCompletionKind to getCompletionKindString
- Remove tracing of the filename, TUScheduler now provides those traces


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D43377

Files:
  clangd/CodeComplete.cpp


Index: clangd/CodeComplete.cpp
===================================================================
--- clangd/CodeComplete.cpp
+++ clangd/CodeComplete.cpp
@@ -855,9 +855,12 @@
     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");
                      });
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43377.134889.patch
Type: text/x-patch
Size: 816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180219/46f062cf/attachment-0001.bin>


More information about the cfe-commits mailing list