balazske marked an inline comment as done. balazske added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.h:40 + /// in this class. + virtual SmartPtrClassMatcher getSmartPointerClassMatcher() const = 0; + ---------------- njames93 wrote: > LegalizeAdulthood wrote: > > There's only one implementation of this abstract method declared here. > > > > Why the extra level in the class hierarchy if there's only one > > implementation? > The idea I think is so that this can be used to make a similar check for > `unique_ptr`. However I almost don't see the need for this, and I'd argue > that they should both be implemented in one check. So this will detect > ```lang=c++ > std::shared_ptr<int> X = new int[5]; > std::unique_ptr<int> Y = new int[5]; > ``` If I remember correctly the idea was to make the possible check for `unique_ptr`. Putting it into a separate check allows to independently turn the checks for shared or unique pointer on or off (like `MakeSmartPtrCheck`). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117306/new/ https://reviews.llvm.org/D117306 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits