aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/initializers-cfg-output.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/initializers-cfg-output.cpp')
-rw-r--r--test/Analysis/initializers-cfg-output.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/Analysis/initializers-cfg-output.cpp b/test/Analysis/initializers-cfg-output.cpp
index b62d979d5bf0..db3c0fb99000 100644
--- a/test/Analysis/initializers-cfg-output.cpp
+++ b/test/Analysis/initializers-cfg-output.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=debug.DumpCFG %s 2>&1 | FileCheck %s
class A {
public:
@@ -43,6 +43,13 @@ TestControlFlow::TestControlFlow(bool b)
int v;
}
+class TestDelegating {
+ int x, z;
+ public:
+ TestDelegating() : TestDelegating(2, 3) {}
+ TestDelegating(int x, int z) : x(x), z(z) {}
+};
+
// CHECK: [B2 (ENTRY)]
// CHECK: Succs (1): B1
// CHECK: [B1]
@@ -95,3 +102,14 @@ TestControlFlow::TestControlFlow(bool b)
// CHECK: Succs (2): B2 B3
// CHECK: [B0 (EXIT)]
// CHECK: Preds (1): B1
+// CHECK: [B2 (ENTRY)]
+// CHECK: Succs (1): B1
+// CHECK: [B1]
+// CHECK: 1: 2
+// CHECK: 2: 3
+// CHECK: 3: [B1.1], [B1.2] (CXXConstructExpr, class TestDelegating)
+// CHECK: 4: TestDelegating([B1.3]) (Delegating initializer)
+// CHECK: Preds (1): B2
+// CHECK: Succs (1): B0
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (1): B1