Author: ibiryukov Date: Wed Dec 13 07:42:59 2017 New Revision: 320591 URL: http://llvm.org/viewvc/llvm-project?rev=320591&view=rev Log: [clangd] Fix bool conversion operator of UniqueFunction
Usages of it were giving compiler errors because of the missing explicit conversion. 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=320591&r1=320590&r2=320591&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/Function.h (original) +++ clang-tools-extra/trunk/clangd/Function.h Wed Dec 13 07:42:59 2017 @@ -49,7 +49,7 @@ public: FunctionCallImpl<typename std::decay<Callable>::type>>( std::forward<Callable>(Func))) {} - operator bool() { return CallablePtr; } + operator bool() { return bool(CallablePtr); } Ret operator()(Args... As) { assert(CallablePtr); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits