This is an archive of the discontinued LLVM Phabricator instance.

clang-tidy: accessing checks not done for aliases of `std::array`
ClosedPublic

Authored by sousajo on Jul 2 2023, 1:30 AM.

Details

Summary

Index accessing checks are not performed for aliases
of std::array, as only std::array itself seems to be checked.

This patchs aims to extend it for aliases such as:
using MyArray = std::array<int, 10>;

Diff Detail

Event Timeline

sousajo created this revision.Jul 2 2023, 1:30 AM
sousajo requested review of this revision.Jul 2 2023, 1:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2023, 1:30 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Please mention this change in Release Notes.

PiotrZSL accepted this revision.Jul 2 2023, 11:31 AM

Looks good, probably hasCanonicalType would be sufficient but hasUnqualifiedDesugaredType will also do a job.
Release notes need to be updated.

This revision is now accepted and ready to land.Jul 2 2023, 11:31 AM
sousajo updated this revision to Diff 536622.Jul 2 2023, 1:11 PM

Thanks ^^ added the release note. Can someone please land it for me?

Jorge Pinto Sousa <jorge.pinto.sousa@proton.me>

sousajo added a comment.EditedJul 3 2023, 6:48 AM

while landing it, if someone feels that the release note can/should be reworded please feel free to do so.