#include "llvm/ADT/TypeSwitch.h"
#include "gtest/gtest.h"
usingnamespacellvm;
namespace {
struct Base { … };
template <Base::Kind DerivedKind> struct DerivedImpl : Base { … };
struct DerivedA : public DerivedImpl<Base::DerivedA> { … };
struct DerivedB : public DerivedImpl<Base::DerivedB> { … };
struct DerivedC : public DerivedImpl<Base::DerivedC> { … };
struct DerivedD : public DerivedImpl<Base::DerivedD> { … };
struct DerivedE : public DerivedImpl<Base::DerivedE> { … };
}
TEST(TypeSwitchTest, CaseResult) { … }
TEST(TypeSwitchTest, CasesResult) { … }
TEST(TypeSwitchTest, CaseVoid) { … }
TEST(TypeSwitchTest, CasesVoid) { … }
TEST(TypeSwitchTest, CaseOptional) { … }
TEST(TypeSwitchTest, CasesOptional) { … }