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

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 16 10:16:35 PST 2018


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, Other.ListenerID);
+      Other.Parent = nullptr;
----------------
We need to unsubscribe `this` in the assignment operator before overwriting `Parent`.
Currently we won't delete `this` from the parent's listeners.


Maybe add a test for that too?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D54475





More information about the cfe-commits mailing list