summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2018-04-19 23:30:15 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2018-04-19 23:30:15 +0000
commitab9b78b20020ca91221bfc6d881621dd67fd0e9d (patch)
tree6bbb2f80f3f4f26bf09f8bac1967dba0e65548ae /clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
parent468bc0d8b9c5ca13af4c3d87b36dc544ccae9265 (diff)
downloadbcm5719-llvm-ab9b78b20020ca91221bfc6d881621dd67fd0e9d.tar.gz
bcm5719-llvm-ab9b78b20020ca91221bfc6d881621dd67fd0e9d.zip
[CFG] [analyzer] Add construction contexts for loop condition variables.
Loop condition variables, eg. while (shared_ptr<int> P = getIntPtr()) { ... }) weren't handled in r324794 because they don't go through the common CFGBuilder::VisitDeclStmt method. Which means that they regressed after r324800. Fix the regression by duplicating the necessary construction context scan in the loop visiting code. Differential Revision: https://reviews.llvm.org/D45706 llvm-svn: 330382
Diffstat (limited to 'clang/test/Analysis/auto-obj-dtors-cfg-output.cpp')
-rw-r--r--clang/test/Analysis/auto-obj-dtors-cfg-output.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
index b5b0e5c218a..43a21dd943d 100644
--- a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
+++ b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
@@ -388,7 +388,8 @@ void test_if_jumps() {
// CHECK: [B4]
// CHECK-NEXT: 1: a
// CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A)
-// CHECK-NEXT: 3: [B4.2] (CXXConstructExpr, class A)
+// WARNINGS-NEXT: 3: [B4.2] (CXXConstructExpr, class A)
+// ANALYZER-NEXT: 3: [B4.2] (CXXConstructExpr, [B4.4], class A)
// CHECK-NEXT: 4: A b = a;
// CHECK-NEXT: 5: b
// CHECK-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const class A)
@@ -478,7 +479,8 @@ void test_while_implicit_scope() {
// CHECK: [B10]
// CHECK-NEXT: 1: a
// CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A)
-// CHECK-NEXT: 3: [B10.2] (CXXConstructExpr, class A)
+// WARNINGS-NEXT: 3: [B10.2] (CXXConstructExpr, class A)
+// ANALYZER-NEXT: 3: [B10.2] (CXXConstructExpr, [B10.4], class A)
// CHECK-NEXT: 4: A b = a;
// CHECK-NEXT: 5: b
// CHECK-NEXT: 6: [B10.5] (ImplicitCastExpr, NoOp, const class A)
@@ -761,7 +763,8 @@ void test_switch_jumps() {
// CHECK: [B4]
// CHECK-NEXT: 1: a
// CHECK-NEXT: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A)
-// CHECK-NEXT: 3: [B4.2] (CXXConstructExpr, class A)
+// WARNINGS-NEXT: 3: [B4.2] (CXXConstructExpr, class A)
+// ANALYZER-NEXT: 3: [B4.2] (CXXConstructExpr, [B4.4], class A)
// CHECK-NEXT: 4: A b = a;
// CHECK-NEXT: 5: b
// CHECK-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const class A)
@@ -851,7 +854,8 @@ void test_for_implicit_scope() {
// CHECK: [B10]
// CHECK-NEXT: 1: b
// CHECK-NEXT: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A)
-// CHECK-NEXT: 3: [B10.2] (CXXConstructExpr, class A)
+// WARNINGS-NEXT: 3: [B10.2] (CXXConstructExpr, class A)
+// ANALYZER-NEXT: 3: [B10.2] (CXXConstructExpr, [B10.4], class A)
// CHECK-NEXT: 4: A c = b;
// CHECK-NEXT: 5: c
// CHECK-NEXT: 6: [B10.5] (ImplicitCastExpr, NoOp, const class A)
OpenPOWER on IntegriCloud