The MSVC STL defines smart pointer operator* and operator-> as method templates. The existing duck typing implementation doesn't catch this implementation. To keep the duck typing simple, I added the already existing list of known standard to the matchers in registerMatchersForGetArrowStart.
Details
Details
- Reviewers
- aaron.ballman - alexfh - sbenza - JonasToth - hokein 
- Commits
- rGe25a0e95104b: Fixed: Duck-typing in readability-redundant-smartptr-get didn't catch MSVC STL…
 rL359801: Fixed: Duck-typing in readability-redundant-smartptr-get didn't catch MSVC STL…
 rCTE359801: Fixed: Duck-typing in readability-redundant-smartptr-get didn't catch MSVC STL…
Diff Detail
Diff Detail
- Repository
- rCTE Clang Tools Extra
Event Timeline
| clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp | ||
|---|---|---|
| 60 ↗ | (On Diff #196898) | not clang-formatted | 
| clang-tools-extra/test/clang-tidy/readability-redundant-smartptr-get-msvc.cpp | ||
|---|---|---|
| 96 ↗ | (On Diff #196911) | Please add new line. | 
| clang-tools-extra/test/clang-tidy/readability-redundant-smartptr-get-msvc.cpp | ||
|---|---|---|
| 37 ↗ | (On Diff #196911) | Unnecessary empty line. | 
Comment Actions
LGTM aside from a commenting nit.
| clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp | ||
|---|---|---|
| 46 ↗ | (On Diff #196960) | Missing a full stop at the end of the comment. |