[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 29 15:24:26 PST 2024


vbvictor wrote:

> 1. Consider TK_IgnoreUnlessSpelledInSource, may simplify matchers
> 2. Name is too generic, consider:
> 
> * bugprone-smartptr-reset-pointee-reset
> * bugprone-smartptr-reset-call
> * bugprone-smartptr-pointee-reset
> * bugprone-smartptr-reset-ambiguous-call (my prefered)
> 
> Or any simillar.

1. Could not find a way to use TK_IgnoreUnlessSpelledInSource because code in function
`template <typename T>
void TemplatePositiveTest() {}`
is implicitly instantiated for different template types, so it is being ignored by matchers with TK_IgnoreUnlessSpelledInSource.
2. Renamed check to bugprone-smartptr-reset-ambiguous-call.


https://github.com/llvm/llvm-project/pull/121291


More information about the cfe-commits mailing list