[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 15 03:15:07 PST 2018
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<typename std::decay<T>::type, T>::value,
+ "use a plain type: event values are always passed by const&");
----------------
NIT: Maybe move this static_assert to the top of the class?
I'd argue this is part of the public interface as it puts constraints on the template parameters.
================
Comment at: clangd/GlobalCompilationDatabase.cpp:73
+ tooling::CompilationDatabase * CDB = nullptr;
+ bool Cached;
std::lock_guard<std::mutex> Lock(Mutex);
----------------
NIT: maybe initialize `Cached` to a specific value as a precaution against introducing UB with some future changes? The current behavior itself seems correct, it's never accessed when uninitialized, albeit it takes some time to figure it out.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D54475
More information about the cfe-commits
mailing list