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

Julian Schmidt via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 30 04:37:10 PST 2024


https://github.com/5chmidti requested changes to this pull request.

I think that this check is one that we don't want to emit fixes for, at least not in the main diagnostic, but maybe as a fixit attached to a note. Sort of like: 
```
warning: ...
note: (be more explicit and) use '= nullptr'
```

The diagnostic message is also too generic and does not say what the problem is. One potential wording could be: `be explicit when calling 'reset()' on a smart-pointer with a pointee that has a 'reset()' method`

What do others think?

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


More information about the cfe-commits mailing list