================ @@ -112,11 +112,11 @@ void EHScopeStack::deallocate(size_t Size) { StartOfData += llvm::alignTo(Size, ScopeStackAlignment); } -bool EHScopeStack::containsOnlyLifetimeMarkers( +bool EHScopeStack::containsOnlyNoopCleanups( EHScopeStack::stable_iterator Old) const { for (EHScopeStack::iterator it = begin(); stabilize(it) != Old; it++) { EHCleanupScope *cleanup = dyn_cast<EHCleanupScope>(&*it); - if (!cleanup || !cleanup->isLifetimeMarker()) + if (!cleanup || !(cleanup->isLifetimeMarker() || cleanup->isFakeUse())) ---------------- jmorse wrote:
I feel like the number of inversions here makes it harder to read; how about the suggestion, ```suggestion if (!cleanup) return false if (!cleanup->isLifetimeMarker() && !cleanup->isFakeUse())) return false; ``` I.e. it's slightly clearer that it's a dont-dereference-null check and a is-it-not-a-noop check. https://github.com/llvm/llvm-project/pull/110102 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits