[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-26 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323511: [clangd] Modify the Span API so that Spans propagate with contexts. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 131546. sammccall marked 2 inline comments as done. sammccall added a comment. Address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42499 Files: clangd/ClangdUnit.cpp clangd/Context.h clangd/Function.h

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added inline comments. Comment at: clangd/JSONRPCDispatcher.cpp:31 + RequestArgs(json::obj *Args) : Args(Args) {} + std::mutex Mu; + json::obj *Args; ilya-biryukov wrote: > We could make the fields private

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. And sorry for confusion with https://reviews.llvm.org/D42524, if any. Comment at: clangd/Function.h:147 - ScopeExitGuard(Func F) : F(std::move(F)) {}

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 131460. sammccall marked 4 inline comments as done. sammccall added a comment. Address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42499 Files: clangd/ClangdUnit.cpp clangd/Context.h clangd/Function.h

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 5 inline comments as done. sammccall added a comment. In https://reviews.llvm.org/D42499#987583, @ilya-biryukov wrote: > I've tried experimenting with that and came up with an alternative that has > less changes to the API. Could you take a look, too? >

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I've tried experimenting with that and came up with an alternative that has less changes to the API. Could you take a look, too? https://reviews.llvm.org/D42524 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42499

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Context.h:163 + + template Context derive(Type &) const && { +static Key::type> Private; s/`const &&`/`&&` Comment at: clangd/Context.h:165 +static Key::type> Private; +

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 131335. sammccall added a comment. Remove obsolete typedef Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42499 Files: clangd/ClangdUnit.cpp clangd/Context.h clangd/Function.h clangd/JSONRPCDispatcher.cpp clangd/Trace.cpp

[PATCH] D42499: [clangd] Modify the Span API so that Spans propagate with contexts.

2018-01-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, ioeric, jkorous-apple, klimek. This is probably the right behavior for distributed tracers, and makes unpaired begin-end events impossible without requiring Spans to be bound to a