tarun-t wrote:
We hit this with `Boost.Asio`. The specific pattern:
`boost::asio::ip::tcp::resolver` registers a service with
`io_context` (which inherits `execution_context`). The execution_context
destructor iterates its service list and calls the `virtual shutdown()` on each
service. This is a safe, intentional pattern — the services are always
most-derived when `shutdown()` is called — but the analyzer flags it because
the call site is inside execution_context's destructor in a system header.
To @haoNoQ's point about template algorithms: `Boost.Asio`'s service model is
exactly this kind of pattern — a system-header class (`execution_context`)
managing internally-created service objects with virtual shutdown(). No user
code is involved in the dispatch at all; the entire call chain lives within
Boost's headers.
https://github.com/llvm/llvm-project/pull/184183
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits