[cfe-commits] r96892 - /cfe/trunk/lib/Sema/SemaChecking.cpp

Ted Kremenek kremenek at apple.com
Mon Feb 22 21:59:16 PST 2010


Author: kremenek
Date: Mon Feb 22 23:59:16 2010
New Revision: 96892

URL: http://llvm.org/viewvc/llvm-project?rev=96892&view=rev
Log:
Simplify check for basic block with a CXXTryStmt terminator.

Modified:
    cfe/trunk/lib/Sema/SemaChecking.cpp

Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=96892&r1=96891&r2=96892&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Mon Feb 22 23:59:16 2010
@@ -2278,9 +2278,8 @@
   for (CFG::iterator I = cfg->begin(), E = cfg->end(); I != E; ++I) {
     CFGBlock &b = **I;
     if (!reachable[b.getBlockID()]) {
-      if (b.pred_begin() == b.pred_end()) {
-        if (!AddEHEdges && b.getTerminator()
-            && isa<CXXTryStmt>(b.getTerminator())) {
+      if (b.pred_empty()) {
+        if (!AddEHEdges && dyn_cast_or_null<CXXTryStmt>(b.getTerminator())) {
           // When not adding EH edges from calls, catch clauses
           // can otherwise seem dead.  Avoid noting them as dead.
           numReachable += ScanReachableFromBlock(b, reachable);





More information about the cfe-commits mailing list