The check should ignore the main function, the program entry point.
It is not possible to use std::array<> for the argv.
The alternative is to use char** argv.
Fixes PR40604
Differential D57787
[clang-tidy] modernize-avoid-c-arrays: avoid main function (PR40604) lebedev.ri on Feb 5 2019, 1:58 PM. Authored by
Details
The check should ignore the main function, the program entry point. Fixes PR40604
Diff Detail
Event Timeline
Comment Actions Add an assert to ensure that clang::FunctionDecl::castFromDeclContext() is safe to do.
Comment Actions LGTM aside from a nit.
|
There is FunctionDecl->castToDeclContext() which is probably a better fit here.