diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-02-10 02:18:04 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-02-10 02:18:04 +0000 |
commit | 5a281bba40a8ea24aa31b149da0de7fc0e445445 (patch) | |
tree | 89a5b6659a76876d9a044043de58b61efac268ee /clang/test/Analysis/initializers-cfg-output.cpp | |
parent | 0df8935c23dd0a17edc5691565aa612c14cedcc1 (diff) | |
download | bcm5719-llvm-5a281bba40a8ea24aa31b149da0de7fc0e445445.tar.gz bcm5719-llvm-5a281bba40a8ea24aa31b149da0de7fc0e445445.zip |
[CFG] Add construction context for constructor initializers.
CFG elements for constructors of fields and base classes that are being
initialized before the body of the whole-class constructor starts can now be
queried to discover that they're indeed participating in initialization of their
respective fields or bases before the whole-class constructor kicks in.
CFG construction contexts are now capable of representing CXXCtorInitializer
triggers, which aren't considered to be statements in the Clang AST.
Differential Revision: https://reviews.llvm.org/D42700
llvm-svn: 324796
Diffstat (limited to 'clang/test/Analysis/initializers-cfg-output.cpp')
-rw-r--r-- | clang/test/Analysis/initializers-cfg-output.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/clang/test/Analysis/initializers-cfg-output.cpp b/clang/test/Analysis/initializers-cfg-output.cpp index aaa1a5a6d56..8d1039ddf34 100644 --- a/clang/test/Analysis/initializers-cfg-output.cpp +++ b/clang/test/Analysis/initializers-cfg-output.cpp @@ -63,13 +63,17 @@ class TestDelegating { // CHECK: [B2 (ENTRY)] // CHECK: Succs (1): B1 // CHECK: [B1] -// CHECK: 1: (CXXConstructExpr, class A) +// WARNINGS: 1: (CXXConstructExpr, class A) +// ANALYZER: 1: (CXXConstructExpr, A() (Base initializer), class A) // CHECK: 2: A([B1.1]) (Base initializer) -// CHECK: 3: (CXXConstructExpr, class C) +// WARNINGS: 3: (CXXConstructExpr, class C) +// ANALYZER: 3: (CXXConstructExpr, C() (Base initializer), class C) // CHECK: 4: C([B1.3]) (Base initializer) -// CHECK: 5: (CXXConstructExpr, class B) +// WARNINGS: 5: (CXXConstructExpr, class B) +// ANALYZER: 5: (CXXConstructExpr, B() (Base initializer), class B) // CHECK: 6: B([B1.5]) (Base initializer) -// CHECK: 7: (CXXConstructExpr, class A) +// WARNINGS: 7: (CXXConstructExpr, class A) +// ANALYZER: 7: (CXXConstructExpr, A() (Base initializer), class A) // CHECK: 8: A([B1.7]) (Base initializer) // CHECK: 9: /*implicit*/(int)0 // CHECK: 10: i([B1.9]) (Member initializer) @@ -118,7 +122,8 @@ class TestDelegating { // CHECK: [B1] // CHECK: 1: 2 // CHECK: 2: 3 -// CHECK: 3: [B1.1], [B1.2] (CXXConstructExpr, class TestDelegating) +// WARNINGS: 3: [B1.1], [B1.2] (CXXConstructExpr, class TestDelegating) +// ANALYZER: 3: [B1.1], [B1.2] (CXXConstructExpr, TestDelegating([B1.1], [B1.2]) (Delegating initializer), class TestDelegating) // CHECK: 4: TestDelegating([B1.3]) (Delegating initializer) // CHECK: Preds (1): B2 // CHECK: Succs (1): B0 |