[cfe-commits] r143766 - in /cfe/trunk: lib/Analysis/CFG.cpp test/Analysis/temp-obj-dtors-cfg-output.cpp

Ted Kremenek kremenek at apple.com
Fri Nov 4 17:10:15 PDT 2011


Author: kremenek
Date: Fri Nov  4 19:10:15 2011
New Revision: 143766

URL: http://llvm.org/viewvc/llvm-project?rev=143766&view=rev
Log:
Per discussion with John McCall, don't add OpaqueValueExprs to the CFG.

Modified:
    cfe/trunk/lib/Analysis/CFG.cpp
    cfe/trunk/test/Analysis/temp-obj-dtors-cfg-output.cpp

Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=143766&r1=143765&r2=143766&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Fri Nov  4 19:10:15 2011
@@ -960,6 +960,9 @@
     case Stmt::MemberExprClass:
       return VisitMemberExpr(cast<MemberExpr>(S), asc);
 
+    case Stmt::NullStmtClass:
+      return Block;
+
     case Stmt::ObjCAtCatchStmtClass:
       return VisitObjCAtCatchStmt(cast<ObjCAtCatchStmt>(S));
 
@@ -975,7 +978,7 @@
     case Stmt::ObjCForCollectionStmtClass:
       return VisitObjCForCollectionStmt(cast<ObjCForCollectionStmt>(S));
 
-    case Stmt::NullStmtClass:
+    case Stmt::OpaqueValueExprClass:
       return Block;
 
     case Stmt::ReturnStmtClass:

Modified: cfe/trunk/test/Analysis/temp-obj-dtors-cfg-output.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/temp-obj-dtors-cfg-output.cpp?rev=143766&r1=143765&r2=143766&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/temp-obj-dtors-cfg-output.cpp (original)
+++ cfe/trunk/test/Analysis/temp-obj-dtors-cfg-output.cpp Fri Nov  4 19:10:15 2011
@@ -505,15 +505,14 @@
 // CHECK:       2: [B4.1]
 // CHECK:       3: [B4.2]
 // CHECK:       4: A a = A() ?: A();
-// CHECK:       T: [B7.5] ? ... : ...
+// CHECK:       T: [B7.4] ? ... : ...
 // CHECK:     Predecessors (2): B5 B6
 // CHECK:     Successors (2): B2 B3
 // CHECK:  [ B5 ]
-// CHECK:       1: [B7.3]
-// CHECK:       2: [B7.3]
+// CHECK:       1: 
+// CHECK:       2: [B5.1]
 // CHECK:       3: [B5.2]
-// CHECK:       4: [B5.3]
-// CHECK:       5: [B5.4] (BindTemporary)
+// CHECK:       4: [B5.3] (BindTemporary)
 // CHECK:     Predecessors (1): B7
 // CHECK:     Successors (1): B4
 // CHECK:  [ B6 ]
@@ -527,10 +526,9 @@
 // CHECK:  [ B7 ]
 // CHECK:       1: A()
 // CHECK:       2: [B7.1] (BindTemporary)
-// CHECK:       3: 
-// CHECK:       4: [B7.3].operator _Bool
-// CHECK:       5: [B7.4]()
-// CHECK:       T: [B7.5] ? ... : ...
+// CHECK:       3: .operator _Bool
+// CHECK:       4: [B7.3]()
+// CHECK:       T: [B7.4] ? ... : ...
 // CHECK:     Predecessors (1): B8
 // CHECK:     Successors (2): B5 B6
 // CHECK:  [ B0 (EXIT) ]
@@ -561,15 +559,14 @@
 // CHECK:       4: foo
 // CHECK:       5: [B4.4]
 // CHECK:       6: [B4.5]([B4.3])
-// CHECK:       T: [B7.6] ? ... : ...
+// CHECK:       T: [B7.5] ? ... : ...
 // CHECK:     Predecessors (2): B5 B6
 // CHECK:     Successors (2): B2 B3
 // CHECK:  [ B5 ]
-// CHECK:       1: [B7.4]
-// CHECK:       2: [B7.4]
+// CHECK:       1: 
+// CHECK:       2: [B5.1]
 // CHECK:       3: [B5.2]
-// CHECK:       4: [B5.3]
-// CHECK:       5: [B5.4] (BindTemporary)
+// CHECK:       4: [B5.3] (BindTemporary)
 // CHECK:     Predecessors (1): B7
 // CHECK:     Successors (1): B4
 // CHECK:  [ B6 ]
@@ -584,10 +581,9 @@
 // CHECK:       1: ~A() (Temporary object destructor)
 // CHECK:       2: A()
 // CHECK:       3: [B7.2] (BindTemporary)
-// CHECK:       4: 
-// CHECK:       5: [B7.4].operator _Bool
-// CHECK:       6: [B7.5]()
-// CHECK:       T: [B7.6] ? ... : ...
+// CHECK:       4: .operator _Bool
+// CHECK:       5: [B7.4]()
+// CHECK:       T: [B7.5] ? ... : ...
 // CHECK:     Predecessors (2): B9 B8
 // CHECK:     Successors (2): B5 B6
 // CHECK:  [ B8 ]
@@ -599,15 +595,14 @@
 // CHECK:       2: [B9.1]
 // CHECK:       3: [B9.2]
 // CHECK:       4: const A &a = A() ?: A();
-// CHECK:       T: [B12.5] ? ... : ...
+// CHECK:       T: [B12.4] ? ... : ...
 // CHECK:     Predecessors (2): B10 B11
 // CHECK:     Successors (2): B7 B8
 // CHECK:  [ B10 ]
-// CHECK:       1: [B12.3]
-// CHECK:       2: [B12.3]
+// CHECK:       1: 
+// CHECK:       2: [B10.1]
 // CHECK:       3: [B10.2]
-// CHECK:       4: [B10.3]
-// CHECK:       5: [B10.4] (BindTemporary)
+// CHECK:       4: [B10.3] (BindTemporary)
 // CHECK:     Predecessors (1): B12
 // CHECK:     Successors (1): B9
 // CHECK:  [ B11 ]
@@ -621,10 +616,9 @@
 // CHECK:  [ B12 ]
 // CHECK:       1: A()
 // CHECK:       2: [B12.1] (BindTemporary)
-// CHECK:       3: 
-// CHECK:       4: [B12.3].operator _Bool
-// CHECK:       5: [B12.4]()
-// CHECK:       T: [B12.5] ? ... : ...
+// CHECK:       3: .operator _Bool
+// CHECK:       4: [B12.3]()
+// CHECK:       T: [B12.4] ? ... : ...
 // CHECK:     Predecessors (1): B13
 // CHECK:     Successors (2): B10 B11
 // CHECK:  [ B0 (EXIT) ]
@@ -764,3 +758,4 @@
 // CHECK:     Predecessors (1): B1
 // CHECK:     Successors (0):
 
+





More information about the cfe-commits mailing list