[clang-tidy] readability-redundant-casting should support shared pointer casting
Open
clang-tidy
enhancement
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```
std::shared_ptr value = std::make_shared(42);
std::shared_ptr result = std::static_pointer_cast(value); // redindant static_pointer_cast
```
```
boost::shared_ptr value = boost::make_shared(42);
boost::shared_ptr result = boost::static_pointer_cast(value); // redindant static_pointer_cast
```
Contributor guide
Research direction
Start at the clang-tidy readability-redundant-casting check named in the issue and reproduce the std::shared_ptr and boost::shared_ptr examples. Done means redundant static_pointer_cast calls in both examples are recognized by the check, with coverage for the demonstrated cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100