diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-05-01 07:23:20 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-05-01 07:23:20 +0000 |
commit | e194710fcd012df67a2694477ef8ce5a19bf376c (patch) | |
tree | 78e9ec79fb9c56e3aeed7c59bc39fac2e825fcd4 /lib/AST/StmtPrinter.cpp | |
parent | 73e0a91c9130a048dfb0928643b9cde1f838b87d (diff) |
Remove another default and a *completely* bogus return from a switch
over type traits.
Add the missing trait from this switch that Clang's warning uncovered.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtPrinter.cpp')
-rw-r--r-- | lib/AST/StmtPrinter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp index 8380e396eb..72d71d3f13 100644 --- a/lib/AST/StmtPrinter.cpp +++ b/lib/AST/StmtPrinter.cpp @@ -1293,7 +1293,6 @@ void StmtPrinter::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *Node) { static const char *getTypeTraitName(UnaryTypeTrait UTT) { switch (UTT) { - default: assert(false && "Unknown type trait"); case UTT_HasNothrowAssign: return "__has_nothrow_assign"; case UTT_HasNothrowConstructor: return "__has_nothrow_constructor"; case UTT_HasNothrowCopy: return "__has_nothrow_copy"; @@ -1315,6 +1314,7 @@ static const char *getTypeTraitName(UnaryTypeTrait UTT) { case UTT_IsFunction: return "__is_function"; case UTT_IsFundamental: return "__is_fundamental"; case UTT_IsIntegral: return "__is_integral"; + case UTT_IsLiteral: return "__is_literal"; case UTT_IsLvalueReference: return "__is_lvalue_reference"; case UTT_IsMemberFunctionPointer: return "__is_member_function_pointer"; case UTT_IsMemberObjectPointer: return "__is_member_object_pointer"; @@ -1334,7 +1334,7 @@ static const char *getTypeTraitName(UnaryTypeTrait UTT) { case UTT_IsVoid: return "__is_void"; case UTT_IsVolatile: return "__is_volatile"; } - return ""; + llvm_unreachable("Type trait not covered by switch statement"); } static const char *getTypeTraitName(BinaryTypeTrait BTT) { |