[PATCH] D73836: [ADT] 'PointerUnion::is' returns 'bool'
Brian Gesiak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 1 13:56:05 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd82e993cd34a: [ADT] 'PointerUnion::is' returns 'bool' (authored by modocache).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73836/new/
https://reviews.llvm.org/D73836
Files:
llvm/include/llvm/ADT/PointerUnion.h
Index: llvm/include/llvm/ADT/PointerUnion.h
===================================================================
--- llvm/include/llvm/ADT/PointerUnion.h
+++ llvm/include/llvm/ADT/PointerUnion.h
@@ -181,7 +181,7 @@
explicit operator bool() const { return !isNull(); }
/// Test if the Union currently holds the type matching T.
- template <typename T> int is() const {
+ template <typename T> bool is() const {
constexpr int Index = pointer_union_detail::TypeIndex<T, PTs...>::Index;
static_assert(Index < sizeof...(PTs),
"PointerUnion::is<T> given type not in the union");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73836.241904.patch
Type: text/x-patch
Size: 611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200201/9e35045b/attachment.bin>
More information about the llvm-commits
mailing list