[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants
Richard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 19 08:00:55 PST 2022
LegalizeAdulthood marked 2 inline comments as done.
LegalizeAdulthood added inline comments.
Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst:11
+`ES.31 <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es31-dont-use-macros-for-constants-or-functions>`_, and
> Is ES.32 really checked by this check? I don't see any example or test that indicates that.
> I'm also unsure if ES.32 should be handled here or via the "readability-identifier-naming" check, which is where you enforce a particular naming convention for different identifiers. Setting ALL_CAPS for macros there would be an effective way of solving ES.32.
It was always handled through an option on this check.
(Look at lines 49-56 of `MacroUsageCheck.cpp`)
It's a little bit odd, because it either checks for the names
or it checks for the constant/function like macros, it never
does both at the same time.
This is the way the check was originally written, I haven't
changed any of that.
CHANGES SINCE LAST ACTION
More information about the cfe-commits