[all-commits] [llvm/llvm-project] 27e367: [clang-tidy] readability-identifier-naming disrega...
Nathan James via All-commits
all-commits at lists.llvm.org
Mon Jan 27 11:23:26 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 27e3671ff49b72640f89c34a415412e400503442
https://github.com/llvm/llvm-project/commit/27e3671ff49b72640f89c34a415412e400503442
Author: Nathan <n.james93 at hotmail.co.uk>
Date: 2020-01-27 (Mon, 27 Jan 2020)
Changed paths:
M clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
M clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
M clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
M clang-tools-extra/docs/ReleaseNotes.rst
M clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst
A clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming-main-like.cpp
M clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming-member-decl-usage.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list