[llvm-branch-commits] [clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)
Yitzhak Mandelbaum via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Sep 5 06:51:46 PDT 2025
================
@@ -478,6 +478,31 @@ class FactGenerator : public ConstStmtVisitor<FactGenerator> {
}
}
+ void VisitCXXConstructExpr(const CXXConstructExpr *CCE) {
+ if (!isGslPointerType(CCE->getType()))
----------------
ymand wrote:
If all of the code here is gsl pointer related, then I suggest factoring into a named function. In my experience, VisitCXXConstructExpr will grow to model other cases...
Otherwise, clearly indicate in comments.
https://github.com/llvm/llvm-project/pull/154009
More information about the llvm-branch-commits
mailing list