This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Add option WarnOnSizeOfPointerToAggregate.
ClosedPublic

Authored by mbenfield on Sep 21 2022, 1:15 PM.

Details

Summary

This is now an option under the check bugprone-sizeof-expression.

Diff Detail

Event Timeline

mbenfield created this revision.Sep 21 2022, 1:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2022, 1:15 PM
mbenfield requested review of this revision.Sep 21 2022, 1:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2022, 1:15 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

This is OK, within existing practice, but it's unfortunate that we have no tests at all for any of these flags.

I'll add a couple simple tests.

I'll add a couple simple tests.

Thanks!!

mbenfield updated this revision to Diff 462007.Sep 21 2022, 2:26 PM

Add a test.

mizvekov accepted this revision.Sep 21 2022, 2:32 PM

Thank you again.

This revision is now accepted and ready to land.Sep 21 2022, 2:32 PM
This revision was landed with ongoing or failed builds.Sep 22 2022, 10:10 AM
This revision was automatically updated to reflect the committed changes.