static const char *getTypeTraitName(UnaryTypeTrait UTT) {
switch (UTT) {
+ default: llvm_unreachable("Unknown unary type trait");
case UTT_HasNothrowAssign: return "__has_nothrow_assign";
case UTT_HasNothrowCopy: return "__has_nothrow_copy";
case UTT_HasNothrowConstructor: return "__has_nothrow_constructor";
case UTT_IsPolymorphic: return "__is_polymorphic";
case UTT_IsUnion: return "__is_union";
}
- llvm_unreachable("Unknown unary type trait");
return "";
}
static const char *getTypeTraitName(BinaryTypeTrait BTT) {
switch (BTT) {
+ default: llvm_unreachable("Unknown binary type trait");
case BTT_IsBaseOf: return "__is_base_of";
}
- llvm_unreachable("Unknown binary type trait");
return "";
}
static UnaryTypeTrait UnaryTypeTraitFromTokKind(tok::TokenKind kind) {
switch(kind) {
+ default: llvm_unreachable("Not a known unary type trait");
case tok::kw___has_nothrow_assign: return UTT_HasNothrowAssign;
case tok::kw___has_nothrow_copy: return UTT_HasNothrowCopy;
case tok::kw___has_nothrow_constructor: return UTT_HasNothrowConstructor;
case tok::kw___is_union: return UTT_IsUnion;
case tok::kw___is_literal: return UTT_IsLiteral;
}
- llvm_unreachable("Not a known unary type trait");
}
static BinaryTypeTrait BinaryTypeTraitFromTokKind(tok::TokenKind kind) {
switch(kind) {
+ default: llvm_unreachable("Not a known binary type trait");
case tok::kw___is_base_of: return BTT_IsBaseOf;
}
- llvm_unreachable("Not a known binary type trait");
}
/// ParseUnaryTypeTrait - Parse the built-in unary type-trait