Extra parentheses around a new expression result in incorrect code
after applying fixes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks for fixing it. It looks much simpler than I thought originally.
Looks good, just a few nits.
clang-tidy/modernize/MakeSmartPtrCheck.cpp | ||
---|---|---|
246 ↗ | (On Diff #168671) | nit: I'd use auto to avoid this long type name, the type is clear to me, it is a lambda function. |
250 ↗ | (On Diff #168671) | nit: we can easily avoid the recursive call by using while here, I think. |
Comment Actions
- Remove recursion, use auto.
clang-tidy/modernize/MakeSmartPtrCheck.cpp | ||
---|---|---|
246 ↗ | (On Diff #168671) | I first tried it with an auto, but the recursive call below didn't compile. Works fine without recursion though. |
250 ↗ | (On Diff #168671) | Turned out that iterative approach here doesn't complicate code as much as I thought it would. |