Adds an option, PreferResetCall, currently defaulted to false, to the check.
When true the check will refactor by calling the reset member function.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/docs/clang-tidy/checks/readability-uniqueptr-delete-release.rst | ||
---|---|---|
24 | Please use single back-ticks for option values. Same below. |
@Eugene.Zelenko I think there should be a herald rule for marking projects as clang-tools-extra automatically
Add tests to ensure Parens are handled correctly.
Add support for pointers to and smart pointers to unique_ptr objects.
LGTM!
clang-tools-extra/test/clang-tidy/checkers/readability-uniqueptr-delete-release.cpp | ||
---|---|---|
40 | Not that I expect this to come up particularly often, but, how about: delete (P2.release)(); |
clang-tools-extra/test/clang-tidy/checkers/readability-uniqueptr-delete-release.cpp | ||
---|---|---|
40 | I don't think Im gonna worry about those given how infrequently bound member functions are used. |
clang-tools-extra/test/clang-tidy/checkers/readability-uniqueptr-delete-release.cpp | ||
---|---|---|
40 | I'm fine with that, but it does come up from people who loathe ADL shenanigans. That said, if it comes up *here*, I'd be surprised. |
clang-tools-extra/test/clang-tidy/checkers/readability-uniqueptr-delete-release.cpp | ||
---|---|---|
40 | In its current config it wont detect it at all. I got it to detect bound member functions but the fix-its never seemed to work properly. I've just left it as it. so no warning or (corrupted fix-it). |
Please use single back-ticks for option values. Same below.