HomePhabricator

[clang-tidy] readability-identifier-naming disregards parameters restrictions…

Authored by njames93 on Jan 25 2020, 4:13 PM.

Description

[clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

Summary:
Typically most main functions have the signature:

int main(int argc, char *argv[])

To stick with convention when renaming parameters we should ignore the argc and argv names even if the parameter style says they should be renamed. This patch addresses this by checking all ParmVarDecls if they form part of a function with a signature that matches main int name(int argc, char * argv[], (optional char *env[]))

Reviewers: aaron.ballman, JonasToth, alexfh, hokein

Reviewed By: aaron.ballman

Subscribers: Mordante, merge_guards_bot, xazax.hun, kristof.beyls, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D73098