================
@@ -0,0 +1,78 @@
+// RUN: %clang_analyze_cc1 -fcxx-exceptions -fexceptions 
-analyzer-checker=debug.DumpCFG -analyzer-config 
cfg-lifetime=true,cfg-scopes=true %s > %t 2>&1
+// RUN: FileCheck --input-file=%t %s
+
+// Check the correct order of the CFG elements when AddLifetime is enabled.
+// The CFG elements in a basic block should appear in reverse order of
+// declaration. This test file also enabled cfg-scopes to ensure that
+// none of the elements appear as a duplicate in the give basic block.
+
+struct NonTrivial {
+  ~NonTrivial();
+};
+
+struct Trivial {
+  int x;
+};
+
+// CHECK:       [B2 (ENTRY)]
+// CHECK-NEXT:    Succs (1): B1
+// CHECK:       [B1]
----------------
steakhal wrote:

Can we tighten the matching by using `CHECK-EMPTY` and `CHECK-NEXT` everywhere 
except for the first CHECK lines?
We should probably also use CHECK-LABEL instead of those first CHECK lines.

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

Reply via email to