This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix -Warray-bound interaction with -fstrict-flex-arrays=1
ClosedPublic

Authored by serge-sans-paille on Aug 29 2022, 8:04 AM.

Details

Summary

The test to check if an array was a FAM in the context of array bound checking and strict-flex-arrays=1 was inverted.
As a by product, improve test coverage.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2022, 8:04 AM
serge-sans-paille requested review of this revision.Aug 29 2022, 8:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2022, 8:05 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
serge-sans-paille edited the summary of this revision. (Show Details)Aug 29 2022, 8:05 AM

Can you add some more details to the patch summary about what this is fixing? Also, should this have a release note? Documentation changes?

serge-sans-paille edited the summary of this revision. (Show Details)Aug 29 2022, 11:26 PM

Description updated, it's just a bug in the previous implementation (by myself!) I don't think it's worth an entry in the release notes.

aaron.ballman accepted this revision.Aug 30 2022, 4:33 AM

Thank you for the updated description! LGTM

This revision is now accepted and ready to land.Aug 30 2022, 4:33 AM