[clang] [LifetimeSafety] Detect use of a reference type as a use of underlying origin (PR #184295)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 30 04:27:32 PDT 2026


================
@@ -248,7 +249,9 @@ class UseFact : public Fact {
   const OriginList *getUsedOrigins() const { return OList; }
   const Expr *getUseExpr() const { return UseExpr; }
   void markAsWritten() { IsWritten = true; }
+  void markAsReferenceWrite() { IsReferenceWrite = true; }
----------------
usx95 wrote:

The first approach LGTM. Having a broken origin list with only a single head might be confusing.

https://github.com/llvm/llvm-project/pull/184295


More information about the cfe-commits mailing list