[PATCH] D70225: [clangd] Simplify the code in XRefs
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 14 05:49:13 PST 2019
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added inline comments.
================
Comment at: clang-tools-extra/clangd/index/Merge.cpp:116
// files.
- More |= Static->refs(Req, [&](const Ref &O) {
if (DynamicIndexFileURIs.count(O.Location.FileURI))
----------------
hokein wrote:
> I assume the potential UB is this code?
Yes, exactly. I believe it's not UB after C++17 or C++20.
However, mutating `More` inside the assignment to `More` definitely makes the reader pause, we'd rather avoid it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70225/new/
https://reviews.llvm.org/D70225
More information about the cfe-commits
mailing list