================
@@ -0,0 +1,138 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -analyzer-config 
cfg-lifetime=true %s > %t 2>&1
+// RUN: FileCheck --input-file=%t %s
+
+// Tests for lifetime-end CFG nodes.
+
+void test_simple_variable() {
+  int i = 0;
+}
+// CHECK:       void test_simple_variable()
+// CHECK:       [B2 (ENTRY)]
+// CHECK-NEXT:    Succs (1): B1
+// CHECK:       [B1]
+// CHECK-NEXT:    1: 0
+// CHECK-NEXT:    2: int i = 0;
+// CHECK-NEXT:    3: [B1.2] (Lifetime ends)
+// CHECK-NEXT:    Preds (1): B2
+// CHECK-NEXT:    Succs (1): B0
+// CHECK:       [B0 (EXIT)]
+// CHECK-NEXT:    Preds (1): B1
----------------
steakhal wrote:

Could you please make sure to have only one `CHECK:` line and the rest is 
either `CHECK-EMPTY:` or `CHECK-NEXT:`
This way it wouldn't accept arbitrary lines between the blocks.

https://github.com/llvm/llvm-project/pull/201123
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to