[llvm-branch-commits] [clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)

2025-09-07 Thread Yitzhak Mandelbaum via llvm-branch-commits
@@ -570,6 +625,31 @@ class FactGenerator : public ConstStmtVisitor { return isPointerType(VD->getType()); } + /// Checks if a call-like expression creates a borrow by passing a value to a + /// reference parameter, creating an IssueFact if it does. + void handleFucnt

[llvm-branch-commits] [clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)

2025-09-05 Thread Yitzhak Mandelbaum via llvm-branch-commits
@@ -478,6 +478,31 @@ class FactGenerator : public ConstStmtVisitor { } } + void VisitCXXConstructExpr(const CXXConstructExpr *CCE) { +if (!isGslPointerType(CCE->getType())) + return; +if (CCE->getNumArgs() != 1) + return; +if (hasOrigin(CCE->getAr

[llvm-branch-commits] [clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)

2025-09-05 Thread Yitzhak Mandelbaum via llvm-branch-commits
@@ -478,6 +478,31 @@ class FactGenerator : public ConstStmtVisitor { } } + void VisitCXXConstructExpr(const CXXConstructExpr *CCE) { +if (!isGslPointerType(CCE->getType())) ymand wrote: If all of the code here is gsl pointer related, then I sugges

[llvm-branch-commits] [clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)

2025-09-05 Thread Yitzhak Mandelbaum via llvm-branch-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/154009 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [LifetimeSafety] Mark all DeclRefExpr as usages of the corresp. origin (PR #154316)

2025-09-03 Thread Yitzhak Mandelbaum via llvm-branch-commits
@@ -559,9 +553,49 @@ class FactGeneratorVisitor : public ConstStmtVisitor { return false; } + void handleAssignment(const Expr *LHSExpr, const Expr *RHSExpr) { +// Find the underlying variable declaration for the left-hand side. +if (const auto *DRE_LHS = +

[llvm-branch-commits] [clang] [LifetimeSafety] Mark all DeclRefExpr as usages of the corresp. origin (PR #154316)

2025-08-29 Thread Yitzhak Mandelbaum via llvm-branch-commits
@@ -317,6 +317,7 @@ class ReturnOfOriginFact : public Fact { class UseFact : public Fact { OriginID UsedOrigin; const Expr *UseExpr; + bool IsWritten = false; ymand wrote: Comment please. https://github.com/llvm/llvm-project/pull/154316 _

[llvm-branch-commits] [clang] [LifetimeSafety] Mark all DeclRefExpr as usages of the corresp. origin (PR #154316)

2025-08-29 Thread Yitzhak Mandelbaum via llvm-branch-commits
@@ -559,9 +553,49 @@ class FactGeneratorVisitor : public ConstStmtVisitor { return false; } + void handleAssignment(const Expr *LHSExpr, const Expr *RHSExpr) { +// Find the underlying variable declaration for the left-hand side. +if (const auto *DRE_LHS = +

[llvm-branch-commits] [clang] [LifetimeSafety] Add loan expiry analysis (PR #148712)

2025-07-21 Thread Yitzhak Mandelbaum via llvm-branch-commits
@@ -832,6 +833,65 @@ class LoanPropagationAnalysis } }; +// = // +// Expired Loans Analysis +// = // + +///

[llvm-branch-commits] [clang] [LifetimeSafety] Add loan expiry analysis (PR #148712)

2025-07-21 Thread Yitzhak Mandelbaum via llvm-branch-commits
@@ -832,6 +833,65 @@ class LoanPropagationAnalysis } }; +// = // +// Expired Loans Analysis +// = // --

[llvm-branch-commits] [clang] [LifetimeSafety] Add loan expiry analysis (PR #148712)

2025-07-21 Thread Yitzhak Mandelbaum via llvm-branch-commits
@@ -23,14 +23,15 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/TimeProfiler.h" #include +#include namespace clang::lifetimes { namespace internal { namespace { -template -inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ID ID) { - return OS << ID

[llvm-branch-commits] [clang] [LifetimeSafety] Add loan expiry analysis (PR #148712)

2025-07-21 Thread Yitzhak Mandelbaum via llvm-branch-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/148712 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [LifetimeSafety] Support bidirectional dataflow analysis (PR #148967)

2025-07-16 Thread Yitzhak Mandelbaum via llvm-branch-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/148967 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [LifetimeSafety] Add loan expiry analysis (PR #148712)

2025-07-16 Thread Yitzhak Mandelbaum via llvm-branch-commits
ymand wrote: Looks good, but what's the plan for tests? https://github.com/llvm/llvm-project/pull/148712 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [LifetimeSafety] Add script for performance benchmarking (PR #147315)

2025-07-14 Thread Yitzhak Mandelbaum via llvm-branch-commits
ymand wrote: Looks good overall, but I'm not terribly familiar with Python. I'm comfortable relying on Gabor's approval, though. https://github.com/llvm/llvm-project/pull/147315 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org h

[llvm-branch-commits] [clang] 1fabe6e - [libTooling] Change `addInclude` to use expansion locs.

2021-01-14 Thread Yitzhak Mandelbaum via llvm-branch-commits
Author: Yitzhak Mandelbaum Date: 2021-01-15T03:08:56Z New Revision: 1fabe6e51917bcd7a1242294069c682fe6dffa45 URL: https://github.com/llvm/llvm-project/commit/1fabe6e51917bcd7a1242294069c682fe6dffa45 DIFF: https://github.com/llvm/llvm-project/commit/1fabe6e51917bcd7a1242294069c682fe6dffa45.diff

[llvm-branch-commits] [clang-tools-extra] 922a5b8 - [clang-tidy] Add test for Transformer-based checks with diagnostics.

2021-01-12 Thread Yitzhak Mandelbaum via llvm-branch-commits
Author: Yitzhak Mandelbaum Date: 2021-01-12T20:15:22Z New Revision: 922a5b894114defb5302e514973de8c9cd23af6a URL: https://github.com/llvm/llvm-project/commit/922a5b894114defb5302e514973de8c9cd23af6a DIFF: https://github.com/llvm/llvm-project/commit/922a5b894114defb5302e514973de8c9cd23af6a.diff

[llvm-branch-commits] [clang] 675a297 - [libTooling] Add support for smart pointers to relevant Transformer `Stencil`s.

2021-01-05 Thread Yitzhak Mandelbaum via llvm-branch-commits
Author: Yitzhak Mandelbaum Date: 2021-01-05T17:57:41Z New Revision: 675a2973ee7745d1859e3b72be40a803dd349e55 URL: https://github.com/llvm/llvm-project/commit/675a2973ee7745d1859e3b72be40a803dd349e55 DIFF: https://github.com/llvm/llvm-project/commit/675a2973ee7745d1859e3b72be40a803dd349e55.diff

[llvm-branch-commits] [clang-tools-extra] 9eb2284 - [clang-tidy] Update uses of deprecated Transformer APIs in StringFindStrContainsCheck.

2021-01-05 Thread Yitzhak Mandelbaum via llvm-branch-commits
Author: Yitzhak Mandelbaum Date: 2021-01-05T16:49:29Z New Revision: 9eb2284f60391eca246f12398d247fc1555d6bf5 URL: https://github.com/llvm/llvm-project/commit/9eb2284f60391eca246f12398d247fc1555d6bf5 DIFF: https://github.com/llvm/llvm-project/commit/9eb2284f60391eca246f12398d247fc1555d6bf5.diff

[llvm-branch-commits] [clang] e6bc4a7 - [libTooling] Add `describe` combinator for formatting AST nodes for diagnostics.

2020-12-07 Thread Yitzhak Mandelbaum via llvm-branch-commits
Author: Yitzhak Mandelbaum Date: 2020-12-07T16:08:05Z New Revision: e6bc4a71e3450d7230205683f63d6e22fbf9bf05 URL: https://github.com/llvm/llvm-project/commit/e6bc4a71e3450d7230205683f63d6e22fbf9bf05 DIFF: https://github.com/llvm/llvm-project/commit/e6bc4a71e3450d7230205683f63d6e22fbf9bf05.diff

[llvm-branch-commits] [clang] fdff677 - [libTooling] Remove deprecated Clang Transformer declarations

2020-11-30 Thread Yitzhak Mandelbaum via llvm-branch-commits
Author: Yitzhak Mandelbaum Date: 2020-11-30T20:15:26Z New Revision: fdff677a955730b3e85b870ff1b30d7f8ea5719c URL: https://github.com/llvm/llvm-project/commit/fdff677a955730b3e85b870ff1b30d7f8ea5719c DIFF: https://github.com/llvm/llvm-project/commit/fdff677a955730b3e85b870ff1b30d7f8ea5719c.diff