<div dir="ltr">Thanks. Fixed in r321173. Should've been explicit from the start.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 18, 2017 at 7:25 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This operator bool should probably be explicit (as most/all of them should be - and most of them in LLVM are) - to avoid undue implicit conversion to other int types.</div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 13, 2017 at 7:43 AM Ilya Biryukov via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ibiryukov<br>
Date: Wed Dec 13 07:42:59 2017<br>
New Revision: 320591<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=320591&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=320591&view=rev</a><br>
Log:<br>
[clangd] Fix bool conversion operator of UniqueFunction<br>
<br>
Usages of it were giving compiler errors because of the missing<br>
explicit conversion.<br>
<br>
Modified:<br>
    clang-tools-extra/trunk/<wbr>clangd/Function.h<br>
<br>
Modified: clang-tools-extra/trunk/<wbr>clangd/Function.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Function.h?rev=320591&r1=320590&r2=320591&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/clang-tools-extra/<wbr>trunk/clangd/Function.h?rev=<wbr>320591&r1=320590&r2=320591&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- clang-tools-extra/trunk/<wbr>clangd/Function.h (original)<br>
+++ clang-tools-extra/trunk/<wbr>clangd/Function.h Wed Dec 13 07:42:59 2017<br>
@@ -49,7 +49,7 @@ public:<br>
                     FunctionCallImpl<typename std::decay<Callable>::type>>(<br>
             std::forward<Callable>(Func))<wbr>) {}<br>
<br>
-  operator bool() { return CallablePtr; }<br>
+  operator bool() { return bool(CallablePtr); }<br>
<br>
   Ret operator()(Args... As) {<br>
     assert(CallablePtr);<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Regards,</div><div>Ilya Biryukov</div></div></div></div></div>
</div>