Do not warn on .reset(.release()) expressions if the deleters are not
compatible.
Using plain assignment will probably not work.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Looks good!
clang-tidy/misc/UniqueptrResetReleaseCheck.cpp | ||
---|---|---|
43 ↗ | (On Diff #22199) | nit: put return on the next line. |
50 ↗ | (On Diff #22199) | nit: I'd use the concrete type here. |
52 ↗ | (On Diff #22199) | Can this only happen if unique_ptr is defined in a nonstandard way? |
90 ↗ | (On Diff #22199) | nit: Why another empty line? |
clang-tidy/misc/UniqueptrResetReleaseCheck.cpp | ||
---|---|---|
52 ↗ | (On Diff #22199) | Ah, I see. But then we can also check if the function pointers are compatible and allow the fix, can't we? |
Comment Actions
Added support for function pointers.
clang-tidy/misc/UniqueptrResetReleaseCheck.cpp | ||
---|---|---|
52 ↗ | (On Diff #22199) | Done |