The IgnoreArray flag was not used before while running the rule. Fixes b/47288
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-pro-type-member-init.ignorearrays.cpp | ||
---|---|---|
5 | Small nit. |
Whats the expected behaviour of sugar types. Can tests be added that demonstrate the behaviour.
I'd argue these cases shouldn't be warned on if IgnoreArrays is enabled and If that behaviour isn't observed currently it should be addressed.
typedef int TypedefArray[4]; using UsingArray = int[4]; struct HasArrayMember { HasArrayMember() {} UsingArray U; // Don't warn on this? TypedefArray T; // Or this? int Number; // Do warn this. };
Extended the test case to confirm the fix also works for alias types(typedef, using).
@njames93, I appreciate your time for the review. May I ask one more thing? I do not have commit rights. Would it be possible for you to make the commit? Thank you!!
No problem, Can you please provide your GitHub username and email so I can mark you as the author of the patch.
I don't know which one you're asking for but if it's for the commit message git user.name Hana Joo and git user.email is hanajoo@google.com and my github username is h-joo same as the phabricator account. Thank you for your help!
Small nit.