[clang] [LifetimeSafety] Detect use-after-invalidation for STL containers (PR #179093)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 6 06:21:51 PST 2026


================
@@ -255,4 +255,74 @@ template <typename T> static bool isRecordWithAttr(QualType Type) {
 bool isGslPointerType(QualType QT) { return isRecordWithAttr<PointerAttr>(QT); }
 bool isGslOwnerType(QualType QT) { return isRecordWithAttr<OwnerAttr>(QT); }
 
+bool isContainerInvalidationMethod(const CXXMethodDecl *MD) {
+  if (!MD)
----------------
usx95 wrote:

Done.

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


More information about the cfe-commits mailing list