================
@@ -1408,7 +1408,6 @@ TEST_F(LifetimeAnalysisTest, TrivialClassDestructorsUAF) {
     }
   )");
   EXPECT_THAT(Origin("ptr"), HasLoansTo({"s"}, "p1"));
-  EXPECT_THAT(Origins({"ptr"}), MustBeLiveAt("p1"));
----------------
NeKon69 wrote:

Oh I found how to dump it. Here you go, as I predicted they were actually 
fields.

```
==========================================
       Lifetime Analysis Facts:
==========================================
Function: target
  Block B2:
  End of Block
  Block B1:
    Use (0 (Decl: a, Type : View), Read)
    Use (1 (Decl: b, Type : View), Read)
    Issue (0 (Path: s), ToOrigin: 2 (Expr: DeclRefExpr, Decl: s))
    OriginFlow: 
        Dest: 3 (Expr: UnaryOperator, Type : S *)
        Src:  2 (Expr: DeclRefExpr, Decl: s)
    Use (5 (Decl: ptr, Type : S *), Write)
    Issue (1 (Path: ptr), ToOrigin: 4 (Expr: DeclRefExpr, Decl: ptr))
    Use (3 (Expr: UnaryOperator, Type : S *), Read)
    OriginFlow: 
        Dest: 5 (Decl: ptr, Type : S *)
        Src:  3 (Expr: UnaryOperator, Type : S *)
    Expire (s)
    TestPoint (Annotation: "p1")
    Use (5 (Decl: ptr, Type : S *), Read)
    Issue (2 (Path: ptr), ToOrigin: 6 (Expr: DeclRefExpr, Decl: ptr))
    Expire (ptr, Origin: 5 (Decl: ptr, Type : S *))
  End of Block
  Block B0:
    OriginEscapes (0 (Decl: a, Type : View), via Field)
    OriginEscapes (1 (Decl: b, Type : View), via Field)
  End of Block
==========================================
LiveOrigins results:
==========================================
TestPoint: p1
  0 (Decl: a, Type : View) is definitely live at this point
  1 (Decl: b, Type : View) is definitely live at this point
  5 (Decl: ptr, Type : S *) is definitely live at this point
  ```

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

Reply via email to