[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 25 11:38:37 PST 2020
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from some minor nits.
================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:340
+ return false;
+ if (FDecl->getAccess() == AS_private || FDecl->getAccess() == AS_protected)
+ return false;
----------------
I'd flip the logic to `!= AS_public` to be more clear that we only care about public members.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst:833
+
+ When set to ``1`` functions that have a similar signature to ``main`` won't
+ enforce checks on the names of their parameters.
----------------
We should document that this defaults to `0` and mention `wmain` as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73098/new/
https://reviews.llvm.org/D73098
More information about the cfe-commits
mailing list