[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 15 14:56:36 PDT 2024


https://github.com/PiotrZSL requested changes to this pull request.

for me oryginal version that used registerMatchers instead of visitor were way better, specially that there are matchers that could be used for this, or could be written.
And even for performance reasons it could be implemented in slightly better way by simply very quickly exclude all classes that do not derive from std::enable_shared_from_this.

If `boost::enable_shared_from_this` got same flaw, then this check should also support it. And this mean it maybe should be configurable.

https://github.com/llvm/llvm-project/pull/102299


More information about the cfe-commits mailing list