[clang-tools-extra] r320591 - [clangd] Fix bool conversion operator of UniqueFunction
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 13 07:42:59 PST 2017
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);
More information about the cfe-commits
mailing list