[PATCH] D42517: [clangd] Pass Context implicitly using TLS.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 05:40:28 PST 2018


sammccall marked 2 inline comments as done.
sammccall added inline comments.


================
Comment at: clangd/Context.h:196
+  ~WithContext() {
+    if (Restore)
+      Context::swap(std::move(*Restore));
----------------
ilya-biryukov wrote:
> I think it can't be `null` after move ctor is deleted.
> Maybe always store a `Context` instead of `unique_ptr` and call `swap` unconditionally?
Right! much nicer.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42517





More information about the cfe-commits mailing list