From: Chandler Carruth Date: Wed, 7 Jul 2010 00:07:37 +0000 (+0000) Subject: Use 'llvm_unreachable' to mark impossible code paths so that GCC doesn't X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=256565b1e33fe62aa1274f0ed19f92ea24029bd3;p=clang Use 'llvm_unreachable' to mark impossible code paths so that GCC doesn't consider them for warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107741 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Checker/IdempotentOperationChecker.cpp b/lib/Checker/IdempotentOperationChecker.cpp index 4b06856ab5..1118d5e279 100644 --- a/lib/Checker/IdempotentOperationChecker.cpp +++ b/lib/Checker/IdempotentOperationChecker.cpp @@ -54,6 +54,7 @@ #include "clang/Checker/PathSensitive/SVals.h" #include "clang/AST/Stmt.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/Support/ErrorHandling.h" using namespace clang; @@ -330,7 +331,7 @@ void IdempotentOperationChecker::VisitEndAnalysis(ExplodedGraph &G, case Impossible: break; case Possible: - assert(0 && "Operation was never marked with an assumption"); + llvm_unreachable("Operation was never marked with an assumption"); } // Create the SourceRange Arrays