diff --git a/llvm/include/llvm/ADT/PointerSumType.h b/llvm/include/llvm/ADT/PointerSumType.h index 132eab58b112a..c4971bf3af87a 100644 --- a/llvm/include/llvm/ADT/PointerSumType.h +++ b/llvm/include/llvm/ADT/PointerSumType.h @@ -239,19 +239,9 @@ struct PointerSumTypeHelper : MemberTs... { TagMask = ~PointerMask }; - // Finally we need a recursive template to do static checks of each - // member. - template - struct Checker : Checker { - static_assert(MemberT::Tag < (1 << NumTagBits), - "This discriminant value requires too many bits!"); - }; - template struct Checker : std::true_type { - static_assert(MemberT::Tag < (1 << NumTagBits), - "This discriminant value requires too many bits!"); - }; - static_assert(Checker::value, - "Each member must pass the checker."); + // Finally, statically check each member. + static_assert(((MemberTs::Tag < (1 << NumTagBits)) && ...), + "A discriminant value requires too many bits!"); }; } // end namespace detail