[PATCH] D114995: clang-tidy: improve the 'modernize-use-default-member-init'
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 16 09:14:49 PST 2021
aaron.ballman added a comment.
In D114995#3183240 <https://reviews.llvm.org/D114995#3183240>, @malcolm.parsons wrote:
> In D114995#3180475 <https://reviews.llvm.org/D114995#3180475>, @aaron.ballman wrote:
>
>> was there a reason we didn't cover that case originally or was it an oversight/left for future work?
>
> It was left for future work - by only considering the initializer list of the default constructor, clang-tidy did not have to work out what to do when the constructors don't agree on what value the member init should have.
Thank you for verifying! @oleg.smolsky -- this would be a very useful test case to add, btw.
In D114995#3181486 <https://reviews.llvm.org/D114995#3181486>, @oleg.smolsky wrote:
> Sure, adding an option is easy, if that's the consensus. What would you call it?
Since we left this for future work, I don't think we need to add a configuration option unless a user finds a need for one.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114995/new/
https://reviews.llvm.org/D114995
More information about the cfe-commits
mailing list