[clang-tools-extra] r321173 - [clangd] Made UniqueFunction's bool conversion explicit

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 20 06:06:05 PST 2017


Author: ibiryukov
Date: Wed Dec 20 06:06:05 2017
New Revision: 321173

URL: http://llvm.org/viewvc/llvm-project?rev=321173&view=rev
Log:
[clangd] Made UniqueFunction's bool conversion explicit

Modified:
    clang-tools-extra/trunk/clangd/Function.h

Modified: clang-tools-extra/trunk/clangd/Function.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Function.h?rev=321173&r1=321172&r2=321173&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Function.h (original)
+++ clang-tools-extra/trunk/clangd/Function.h Wed Dec 20 06:06:05 2017
@@ -49,7 +49,7 @@ public:
                     FunctionCallImpl<typename std::decay<Callable>::type>>(
             std::forward<Callable>(Func))) {}
 
-  operator bool() { return bool(CallablePtr); }
+  explicit operator bool() { return bool(CallablePtr); }
 
   Ret operator()(Args... As) {
     assert(CallablePtr);




More information about the cfe-commits mailing list