[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 8 02:43:53 PDT 2024
MichelleCDjunaidi wrote:
> How are classes that derive other classes that implement `enable_shared_from_this`
>
> ```c++
> class A : public std::enable_shared_from_this {};
> class B : private A{};
> ```
Looking at the AST dump that clang-check gives, it seems that B doesn't have any knowledge of A's internals, so the current approach will not work. Correct me if I'm wrong though
https://github.com/llvm/llvm-project/pull/102299
More information about the cfe-commits
mailing list