[cfe-commits] r163039 - in /cfe/trunk/lib/Sema: SemaDecl.cpp SemaDeclCXX.cpp SemaType.cpp
Joao Matos
ripzonetriton at gmail.com
Fri Aug 31 17:13:24 PDT 2012
Author: triton
Date: Fri Aug 31 19:13:24 2012
New Revision: 163039
URL: http://llvm.org/viewvc/llvm-project?rev=163039&view=rev
Log:
Changed the remaining dead asserts to llvm_unreachable.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/lib/Sema/SemaType.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=163039&r1=163038&r2=163039&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Fri Aug 31 19:13:24 2012
@@ -8217,15 +8217,13 @@
/// WARNING: Indexes apply to particular diagnostics only!
///
/// \returns diagnostic %select index.
-static unsigned getRedeclDiagFromTagKind(TagTypeKind Tag)
-{
+static unsigned getRedeclDiagFromTagKind(TagTypeKind Tag) {
switch (Tag) {
- case TTK_Struct: return 0;
- case TTK_Interface: return 1;
- case TTK_Class: return 2;
- default: assert("Invalid tag kind for redecl diagnostic!");
+ case TTK_Struct: return 0;
+ case TTK_Interface: return 1;
+ case TTK_Class: return 2;
+ default: llvm_unreachable("Invalid tag kind for redecl diagnostic!");
}
- return -1;
}
/// \brief Determine if tag kind is a class-key compatible with
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=163039&r1=163038&r2=163039&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Fri Aug 31 19:13:24 2012
@@ -680,15 +680,13 @@
/// WARNING: Indexes apply to particular diagnostics only!
///
/// \returns diagnostic %select index.
-static unsigned getRecordDiagFromTagKind(TagTypeKind Tag)
-{
+static unsigned getRecordDiagFromTagKind(TagTypeKind Tag) {
switch (Tag) {
- case TTK_Struct: return 0;
- case TTK_Interface: return 1;
- case TTK_Class: return 2;
- default: assert("Invalid tag kind for record diagnostic!");
+ case TTK_Struct: return 0;
+ case TTK_Interface: return 1;
+ case TTK_Class: return 2;
+ default: llvm_unreachable("Invalid tag kind for record diagnostic!");
}
- return -1;
}
// CheckConstexprFunctionDecl - Check whether a function declaration satisfies
Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=163039&r1=163038&r2=163039&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Fri Aug 31 19:13:24 2012
@@ -4437,15 +4437,13 @@
/// WARNING: Indexes apply to particular diagnostics only!
///
/// \returns diagnostic %select index.
-static unsigned getLiteralDiagFromTagKind(TagTypeKind Tag)
-{
+static unsigned getLiteralDiagFromTagKind(TagTypeKind Tag) {
switch (Tag) {
- case TTK_Struct: return 0;
- case TTK_Interface: return 1;
- case TTK_Class: return 2;
- default: assert("Invalid tag kind for literal type diagnostic!");
+ case TTK_Struct: return 0;
+ case TTK_Interface: return 1;
+ case TTK_Class: return 2;
+ default: llvm_unreachable("Invalid tag kind for literal type diagnostic!");
}
- return -1;
}
/// @brief Ensure that the type T is a literal type.
More information about the cfe-commits
mailing list