[PATCH] D48068: [clangd] Move caching of compile args out of ClangdServer.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 13 02:15:01 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: clangd/GlobalCompilationDatabase.cpp:137
+ // 'It' may be invalid at this point, recompute it.
+ It = Cached.find(File);
+ if (It != Cached.end())
----------------
sammccall wrote:
> `return try_emplace(File, std::move(Command)).second`?
>
> (This has different behavior if the cache was filled while you unlocked, but it's arguably the right behavior and doesn't really matter).
Thanks, good catch! We'd rather return the cached value rather than the computed one.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48068
More information about the cfe-commits
mailing list