[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-20 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347297: [clangd] Allow observation of changes to global CDBs. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D54475 Files

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-20 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 Comment at: clangd/Function.h:147 +private: + static_assert(std::is_same::type, T>::value, +"use a plain type: event values are always pas

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/Function.h:147 +private: + static_assert(std::is_same::type, T>::value, +"use a plain type: event values are always passed by const&"); ilya-biryukov wrote: > NIT: Maybe move this static_assert

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 174633. sammccall marked 2 inline comments as done. sammccall added a comment. Herald added a subscriber: mgorny. Address comments, add test for Event machinery. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54475 Files: clangd/Functio

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added inline comments. This revision now requires changes to proceed. Comment at: clangd/Function.h:108 +Subscription &operator=(Subscription &&Other) { + std::tie(Parent, ListenerID) = std::tie(Other.Parent

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-15 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 Comment at: clangd/Function.h:147 +private: + static_assert(std::is_same::type, T>::value, +"use a plain type: event values are always pas

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 174014. sammccall marked 3 inline comments as done. sammccall added a comment. Address comments. Add missing OverlayCDB->Base watching (oops!) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54475 Files: clangd/Function.h clangd/Global

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Function.h:90 +class Event { +public: + // A Listener is the callback through which events are delivered. I assume the `Event` is supposed to be used only with non-reference and non-const qualified types.

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric. Currently, changes *within* CDBs are not tracked (CDB has no facility to do so). However, discovery of new CDBs are tracked (all files a