antoniofrighetto wrote: > > I'm a little worried about adding provenance annotations when we haven't > > nailed this down yet. Especially with -fno-assume-sane-operator-new, since > > that's the only escape hatch we have at the moment. > > Thinking about this again, making this part of `-fassume-sane-operator-new` > probably makes sense, because the `captures(address)` on `operator delete` is > kind of the dual of `noalias` on `operator new`, and we only add the latter > for sane operator new.
I understand the concerns raised here, and that, in principle, if we don't assume sane allocator semantics, it may as well be questionable to assert that pointer provenance does not outlive `operator delete`; but I can't immediately see how the unusual semantics for `operator new` are also implied for `operator delete`. `-fassume-sane-operator-new` seems to make a statement about operator new only, not about delete (unlike GCC `-fassume-sane-operators-new-delete` which covers the latter too), which also makes me slightly cast doubts on the duality between captures(address) and noalias itself. https://github.com/llvm/llvm-project/pull/198202 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
