[clang-tools-extra] [clang-tidy] Fix smart pointers handling in bugprone-use-after-move (PR #94869)

via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 5 00:34:14 PDT 2024


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

Sorry - I only noticed now after your rebase that this had been sitting in my review queue  for quite a while.

*  I would suggest rewording the option name. The "ignore" (`IgnoreNonDerefSmartPtrs`) reads like a negation, which makes it harder to reason about what the option does. How about `AllowMovedSmartPtrUse`? (I think maybe the "non-deref" can be omitted from the option name -- I think it's sufficient that it's explained in the documentation).

*  In https://github.com/llvm/llvm-project/issues/90174, I suggested that if we wanted to change the default behavior, we should survey users to see what their opinions / preferences are. Have you done this? If not, I think the default behavior (when the option is not set) should remain unchanged.

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


More information about the cfe-commits mailing list