sammccall added inline comments.
================ Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:91 + // Whether a new CDB has been loaded but not broadcast yet. + bool Dirty = false; + // Last loaded CDB, meaningful if CachePopulated is set. ---------------- kadircet wrote: > maybe rename this to `DidBroadcast` if we are not planning to add extra > meaning to `Dirty` in the near future? Renamed to `NeedsBroadcast`. (`DidBroadcast` isn't quite right once we can reload databases and thus need to broadcast again) ================ Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:119 + if (CachePopulated) { + ShouldBroadcast = Dirty; + Dirty = false; ---------------- kadircet wrote: > what if caller is not willing to broadcast? Good catch, thanks. Changed the handling of ShouldBroadcast to always flow via NeedsBroadcast, which is set by load(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92381/new/ https://reviews.llvm.org/D92381 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits