[PATCH] D49657: [clangd] Make SymbolLocation => bool conversion explicitly.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 23 04:55:26 PDT 2018
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
Scary....
Definitely LGTM!
================
Comment at: clangd/index/Index.h:45
- operator bool() const { return !FileURI.empty(); }
+ explicit operator bool() const { return !FileURI.empty(); }
+ bool operator==(const SymbolLocation& Loc) const {
----------------
Maybe we should go even further and replace this with an `isValid` method? Conversion ops are confusing.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D49657
More information about the cfe-commits
mailing list