summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/scopes-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/scopes-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/scopes-cfg-output.cpp')
-rw-r--r--clang/test/Analysis/scopes-cfg-output.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Analysis/scopes-cfg-output.cpp b/clang/test/Analysis/scopes-cfg-output.cpp
index 28dde459173..0f2201abb09 100644
--- a/clang/test/Analysis/scopes-cfg-output.cpp
+++ b/clang/test/Analysis/scopes-cfg-output.cpp
@@ -296,7 +296,7 @@ void test_if_jumps() {
// CHECK-NEXT: 1: CFGScopeBegin(b)
// CHECK-NEXT: 2: a
// CHECK-NEXT: 3: [B4.2] (ImplicitCastExpr, NoOp, const class A)
-// CHECK-NEXT: 4: [B4.3] (CXXConstructExpr, class A)
+// CHECK-NEXT: 4: [B4.3] (CXXConstructExpr, [B4.5], class A)
// CHECK-NEXT: 5: A b = a;
// CHECK-NEXT: 6: b
// CHECK-NEXT: 7: [B4.6] (ImplicitCastExpr, NoOp, const class A)
@@ -395,7 +395,7 @@ void test_while_implicit_scope() {
// CHECK-NEXT: 1: CFGScopeBegin(b)
// CHECK-NEXT: 2: a
// CHECK-NEXT: 3: [B10.2] (ImplicitCastExpr, NoOp, const class A)
-// CHECK-NEXT: 4: [B10.3] (CXXConstructExpr, class A)
+// CHECK-NEXT: 4: [B10.3] (CXXConstructExpr, [B10.5], class A)
// CHECK-NEXT: 5: A b = a;
// CHECK-NEXT: 6: b
// CHECK-NEXT: 7: [B10.6] (ImplicitCastExpr, NoOp, const class A)
@@ -540,7 +540,7 @@ void test_do_jumps() {
// CHECK-NEXT: 1: CFGScopeBegin(b)
// CHECK-NEXT: 2: a
// CHECK-NEXT: 3: [B4.2] (ImplicitCastExpr, NoOp, const class A)
-// CHECK-NEXT: 4: [B4.3] (CXXConstructExpr, class A)
+// CHECK-NEXT: 4: [B4.3] (CXXConstructExpr, [B4.5], class A)
// CHECK-NEXT: 5: A b = a;
// CHECK-NEXT: 6: b
// CHECK-NEXT: 7: [B4.6] (ImplicitCastExpr, NoOp, const class A)
@@ -640,7 +640,7 @@ void test_for_implicit_scope() {
// CHECK-NEXT: 1: CFGScopeBegin(c)
// CHECK-NEXT: 2: b
// CHECK-NEXT: 3: [B10.2] (ImplicitCastExpr, NoOp, const class A)
-// CHECK-NEXT: 4: [B10.3] (CXXConstructExpr, class A)
+// CHECK-NEXT: 4: [B10.3] (CXXConstructExpr, [B10.5], class A)
// CHECK-NEXT: 5: A c = b;
// CHECK-NEXT: 6: c
// CHECK-NEXT: 7: [B10.6] (ImplicitCastExpr, NoOp, const class A)
OpenPOWER on IntegriCloud