]> granicus.if.org Git - clang/commitdiff
Use 'llvm_unreachable' to mark impossible code paths so that GCC doesn't
authorChandler Carruth <chandlerc@gmail.com>
Wed, 7 Jul 2010 00:07:37 +0000 (00:07 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 7 Jul 2010 00:07:37 +0000 (00:07 +0000)
consider them for warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107741 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Checker/IdempotentOperationChecker.cpp

index 4b06856ab5550da522bed33485b3979a5e50f697..1118d5e279d4a6226d463b934141dd368cd5fa7c 100644 (file)
@@ -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