[cfe-commits] r145524 - in /cfe/trunk: lib/AST/StmtPrinter.cpp test/Analysis/temp-obj-dtors-cfg-output.cpp
Ted Kremenek
kremenek at apple.com
Wed Nov 30 14:08:08 PST 2011
Author: kremenek
Date: Wed Nov 30 16:08:08 2011
New Revision: 145524
URL: http://llvm.org/viewvc/llvm-project?rev=145524&view=rev
Log:
Per an offline conversation with John McCall, have StmtPrinter actually print out the source expression for OpaqueValueExpr.
Modified:
cfe/trunk/lib/AST/StmtPrinter.cpp
cfe/trunk/test/Analysis/temp-obj-dtors-cfg-output.cpp
Modified: cfe/trunk/lib/AST/StmtPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtPrinter.cpp?rev=145524&r1=145523&r2=145524&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
+++ cfe/trunk/lib/AST/StmtPrinter.cpp Wed Nov 30 16:08:08 2011
@@ -1616,7 +1616,9 @@
OS << *Node->getDecl();
}
-void StmtPrinter::VisitOpaqueValueExpr(OpaqueValueExpr *Node) {}
+void StmtPrinter::VisitOpaqueValueExpr(OpaqueValueExpr *Node) {
+ PrintExpr(Node->getSourceExpr());
+}
void StmtPrinter::VisitAsTypeExpr(AsTypeExpr *Node) {
OS << "__builtin_astype(";
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=145524&r1=145523&r2=145524&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/temp-obj-dtors-cfg-output.cpp (original)
+++ cfe/trunk/test/Analysis/temp-obj-dtors-cfg-output.cpp Wed Nov 30 16:08:08 2011
@@ -521,7 +521,7 @@
// CHECK: Predecessors (2): B5 B6
// CHECK: Successors (2): B2 B3
// CHECK: [ B5 ]
-// CHECK: 1:
+// CHECK: 1: [B7.2]
// CHECK: 2: [B5.1]
// CHECK: 3: [B5.2]
// CHECK: 4: [B5.3] (BindTemporary)
@@ -538,7 +538,7 @@
// CHECK: [ B7 ]
// CHECK: 1: A()
// CHECK: 2: [B7.1] (BindTemporary)
-// CHECK: 3: .operator _Bool
+// CHECK: 3: [B7.2].operator _Bool
// CHECK: 4: [B7.3]()
// CHECK: 5: [B7.4]
// CHECK: T: [B7.5] ? ... : ...
@@ -576,7 +576,7 @@
// CHECK: Predecessors (2): B5 B6
// CHECK: Successors (2): B2 B3
// CHECK: [ B5 ]
-// CHECK: 1:
+// CHECK: 1: [B7.3]
// CHECK: 2: [B5.1]
// CHECK: 3: [B5.2]
// CHECK: 4: [B5.3] (BindTemporary)
@@ -594,7 +594,7 @@
// CHECK: 1: ~A() (Temporary object destructor)
// CHECK: 2: A()
// CHECK: 3: [B7.2] (BindTemporary)
-// CHECK: 4: .operator _Bool
+// CHECK: 4: [B7.3].operator _Bool
// CHECK: 5: [B7.4]()
// CHECK: 6: [B7.5]
// CHECK: T: [B7.6] ? ... : ...
@@ -613,7 +613,7 @@
// CHECK: Predecessors (2): B10 B11
// CHECK: Successors (2): B7 B8
// CHECK: [ B10 ]
-// CHECK: 1:
+// CHECK: 1: [B12.2]
// CHECK: 2: [B10.1]
// CHECK: 3: [B10.2]
// CHECK: 4: [B10.3] (BindTemporary)
@@ -630,7 +630,7 @@
// CHECK: [ B12 ]
// CHECK: 1: A()
// CHECK: 2: [B12.1] (BindTemporary)
-// CHECK: 3: .operator _Bool
+// CHECK: 3: [B12.2].operator _Bool
// CHECK: 4: [B12.3]()
// CHECK: 5: [B12.4]
// CHECK: T: [B12.5] ? ... : ...
@@ -773,3 +773,4 @@
// CHECK: [ B0 (EXIT) ]
// CHECK: Predecessors (1): B1
// CHECK: Successors (0):
+
More information about the cfe-commits
mailing list