From: Davide Italiano Date: Sat, 30 Jan 2016 08:03:54 +0000 (+0000) Subject: assert(false) -> llvm_unreachable(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbaf623a1bd7f6806a0148425d20e5e79648a642;p=clang assert(false) -> llvm_unreachable(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259302 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 42d7ed3ac6..1b62a7b579 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -985,7 +985,7 @@ void StringLiteral::setString(const ASTContext &C, StringRef Str, break; } default: - assert(false && "unsupported CharByteWidth"); + llvm_unreachable("unsupported CharByteWidth"); } } diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp index 7cc597dabe..666b72e2ed 100644 --- a/lib/AST/StmtPrinter.cpp +++ b/lib/AST/StmtPrinter.cpp @@ -2462,7 +2462,7 @@ void StmtPrinter::VisitOpaqueValueExpr(OpaqueValueExpr *Node) { void StmtPrinter::VisitTypoExpr(TypoExpr *Node) { // TODO: Print something reasonable for a TypoExpr, if necessary. - assert(false && "Cannot print TypoExpr nodes"); + llvm_unreachable("Cannot print TypoExpr nodes"); } void StmtPrinter::VisitAsTypeExpr(AsTypeExpr *Node) { diff --git a/lib/Serialization/ASTWriterStmt.cpp b/lib/Serialization/ASTWriterStmt.cpp index acba66a50c..08615e113f 100644 --- a/lib/Serialization/ASTWriterStmt.cpp +++ b/lib/Serialization/ASTWriterStmt.cpp @@ -1652,7 +1652,7 @@ void ASTStmtWriter::VisitOpaqueValueExpr(OpaqueValueExpr *E) { void ASTStmtWriter::VisitTypoExpr(TypoExpr *E) { VisitExpr(E); // TODO: Figure out sane writer behavior for a TypoExpr, if necessary - assert(false && "Cannot write TypoExpr nodes"); + llvm_unreachable("Cannot write TypoExpr nodes"); } //===----------------------------------------------------------------------===//