<div dir="auto">Or make operator bool explicit</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 23, 2018, 13:55 Ilya Biryukov via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ilya-biryukov accepted this revision.<br>
ilya-biryukov added a comment.<br>
This revision is now accepted and ready to land.<br>
<br>
Scary....<br>
Definitely LGTM!<br>
<br>
<br>
<br>
================<br>
Comment at: clangd/index/Index.h:45<br>
<br>
-  operator bool() const { return !FileURI.empty(); }<br>
+  explicit operator bool() const { return !FileURI.empty(); }<br>
+  bool operator==(const SymbolLocation& Loc) const {<br>
----------------<br>
Maybe we should go even further and replace this with an `isValid` method? Conversion ops are confusing.<br>
<br>
<br>
Repository:<br>
  rCTE Clang Tools Extra<br>
<br>
<a href="https://reviews.llvm.org/D49657" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D49657</a><br>
<br>
<br>
<br>
</blockquote></div>