================
@@ -498,6 +513,43 @@ class LifetimeChecker {
}
}
}
+
+ /// Retrieve a list of reliable expressions from OriginIFlowChain that
+ /// can be used for Sema warnings.
+ ///
+ /// Although the AST node corresponding to Origin can be either a
+ /// `const Expr *` or a `const ValueDecl *`, `buildOriginFlowChain` only
+ /// collects Origins from RHS expressions. Therefore, we do not need to
+ /// handle non-expression cases here.
----------------
usx95 wrote:
```
/// Extract expressions from the origin flow chain for diagnostic purposes.
///
/// Given a chain of origins that shows how a loan propagates, this function
/// extracts the corresponding expressions for each origin. Origins that refer
/// to declarations (rather than expressions) are skipped.
```
https://github.com/llvm/llvm-project/pull/199345
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits