[clang] Introduce -Warray-parameter
authorserge-sans-paille <sguelton@redhat.com>
Thu, 23 Jun 2022 14:20:09 +0000 (16:20 +0200)
committerserge-sans-paille <sguelton@redhat.com>
Fri, 8 Jul 2022 20:36:05 +0000 (22:36 +0200)
commitcc5b77273af3705b6f5cf574567b49d5158bb3a9
tree3c98bb05d350ea5dd99d54f59eb2df77e03ebf21
parentadf1ffe95854a245cbc48bbaea55f60b003d5f76
[clang] Introduce -Warray-parameter

This warning exist in GCC[0] and warns about re-declarations of functions
involving arguments of array or pointer types of inconsistent kinds or forms.

This is not the exact same implementation as GCC's : there's no warning level
and that flag has no effect on -Warray-bounds.

[0] https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wno-array-parameter

Differential Revision: https://reviews.llvm.org/D128449
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDecl.cpp
clang/test/Misc/warning-wall.c
clang/test/Sema/array-parameter.c [new file with mode: 0644]
clang/test/Sema/array-parameter.cpp [new file with mode: 0644]