[PATCH] D52789: [clangd] Dex: FALSE iterator, peephole optimizations, fix AND bug
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 4 06:10:25 PDT 2018
sammccall marked 5 inline comments as done.
sammccall added inline comments.
================
Comment at: clangd/index/dex/Iterator.cpp:376
+ }
+ default:
+ RealChildren.push_back(std::move(Child));
----------------
ilya-biryukov wrote:
> Maybe replace with `case Kind::Other` to make sure compiler gives a warning to update the switch when new kinds are added?
> Same for other switches on kind
Actually this is deliberate, there's no particular need to specialize on every kind. (and in fact we have Or specialized on one fewer than And, but I wrote the case out in order to leave a comment)
================
Comment at: clangd/index/dex/Iterator.cpp:385
+ default:
+ return llvm::make_unique<AndIterator>(move(RealChildren));
+ }
----------------
ilya-biryukov wrote:
> Maybe use the qualified `std::move` for consistency with the previous line?
Updated throughout.
(This file was inconsistent and I was trying to preserve... something, but I'm not sure what)
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D52789
More information about the cfe-commits
mailing list