[PATCH] D108370: [clang-tidy] Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 23 05:41:26 PDT 2021


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:484
+                         AnyMemberHasInitPerUnion, [&](const FieldDecl *F) {
     if (!FieldsToInit.count(F))
       return;
----------------
Sockke wrote:
> aaron.ballman wrote:
> > Given that we're touching this code, we might as well make clang-format happy with it (though I can't quite spot what it wants changed, so if it turns out to be a bad idea for some reason, I don't insist).
> > Given that we're touching this code, we might as well make clang-format happy with it (though I can't quite spot what it wants changed, so if it turns out to be a bad idea for some reason, I don't insist).
> 
> Yes, I have tried to format this code with clang-format but it does not work perfectly.
Then as-is is fine by me, thank you!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108370/new/

https://reviews.llvm.org/D108370



More information about the cfe-commits mailing list