r218128 - Silence MSVC warnings from r218127 about not returning a value

Reid Kleckner reid at kleckner.net
Fri Sep 19 09:20:24 PDT 2014


Author: rnk
Date: Fri Sep 19 11:20:24 2014
New Revision: 218128

URL: http://llvm.org/viewvc/llvm-project?rev=218128&view=rev
Log:
Silence MSVC warnings from r218127 about not returning a value

Modified:
    cfe/trunk/lib/AST/ASTTypeTraits.cpp

Modified: cfe/trunk/lib/AST/ASTTypeTraits.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTTypeTraits.cpp?rev=218128&r1=218127&r2=218128&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTTypeTraits.cpp (original)
+++ cfe/trunk/lib/AST/ASTTypeTraits.cpp Fri Sep 19 11:20:24 2014
@@ -69,6 +69,7 @@ ASTNodeKind ASTNodeKind::getFromNode(con
 #define ABSTRACT_DECL(D)
 #include "clang/AST/DeclNodes.inc"
   };
+  llvm_unreachable("invalid decl kind");
 }
 
 ASTNodeKind ASTNodeKind::getFromNode(const Stmt &S) {
@@ -79,6 +80,7 @@ ASTNodeKind ASTNodeKind::getFromNode(con
 #define ABSTRACT_STMT(S)
 #include "clang/AST/StmtNodes.inc"
   }
+  llvm_unreachable("invalid stmt kind");
 }
 
 ASTNodeKind ASTNodeKind::getFromNode(const Type &T) {
@@ -88,6 +90,7 @@ ASTNodeKind ASTNodeKind::getFromNode(con
 #define ABSTRACT_TYPE(Class, Base)
 #include "clang/AST/TypeNodes.def"
   }
+  llvm_unreachable("invalid type kind");
 }
 
 void DynTypedNode::print(llvm::raw_ostream &OS,





More information about the cfe-commits mailing list