================
@@ -1824,8 +1837,11 @@ CFGBlock *CFGBuilder::addInitializer(CXXCtorInitializer
*I) {
if (BuildOpts.AddTemporaryDtors && HasTemporaries) {
----------------
AbhinavPradeep wrote:
Yep I will instead add them on `BuildOpts.AddLifetime`.
I was piggybacking off of the destructor visitation in `VisitForTemporaryDtors`
to conditionally track all the non lifetime-extended `MTE` for our marker. This
would save doing an extra walk. For the refactor, would you suggest:
1. Refactoring `VisitForTemporaryDtors` --> `VisitForTemporaries` such that it
would do a visitation, conditionally adding destructors and tracking `MTE`
based on the `BuildOpts` flags. In this way we still only do one visitation.
OR
2. Write a seperate visitor `VisitForTemporaryMarkers` to do just the lifetime
marker visitation. This would be a double up of work for every
`FullExprCleanup` and the initialziations, but would not redefine
`VisitForTemporaryDtors`
I am leaning towards 1, should I go ahead and implement it?
https://github.com/llvm/llvm-project/pull/177985
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits