[clang-tools-extra] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCheck for flexible … (PR #117529)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 25 07:47:07 PST 2024
https://github.com/PiotrZSL requested changes to this pull request.
You modify also check related to make_unique.
Do:
- Add MakeSmartPtrType in MakeSmartPtrCheck as protected (do not initialize in constructor)
- Add MakeSmartPtrType to storeOptions
- Read MakeSmartPtrType in MakeSharedPtrCheck & MakeUniquePtrCheck constructors (set different default values)
- Use MakeSmartPtrType in getSmartPointerTypeMatcher in both classes
- Modify documentation for both checks
- Add entry for both checks in release notes
- Consider doing same for 'std::make_shared'
- Consider supporting multiple smart ptr types and multiple make functions
With current implementation you may run into issue where when setting custom smart ptr, you won't have anymore support for shared_ptr.
Other option would be to add "make-custom" check, and leave it unconfigured.
You may wait until others comment.
https://github.com/llvm/llvm-project/pull/117529
More information about the cfe-commits
mailing list