[clang] [LifetimeSafety] Model bit_cast and atomic casts in the fact generator (PR #204591)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 19 00:43:37 PDT 2026
================
@@ -101,6 +101,10 @@ class LifetimeAnnotatedOriginTypeCollector
} // namespace
bool OriginManager::hasOrigins(QualType QT, bool IntrinsicOnly) const {
+ // An `_Atomic(T)` wraps T transparently for lifetime purposes (the atomic
+ // holds the same value); see through it.
+ if (const auto *AT = QT->getAs<AtomicType>())
+ return hasOrigins(AT->getValueType(), IntrinsicOnly);
----------------
Xazax-hun wrote:
Done.
https://github.com/llvm/llvm-project/pull/204591
More information about the cfe-commits
mailing list