[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"
Florin Iucha via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 10 16:30:41 PDT 2018
0x8000-0000 added inline comments.
================
Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:42
+
+ const auto &Parents = Result.Context->getParents(*MatchedDecl);
+ for (const auto &Parent : Parents) {
----------------
Eugene.Zelenko wrote:
> Please don't use auto where type is not easily deducible. Same in other places.
This is the same code pattern as bugprone/MultipleStatementMacroCheck.cpp and readability/RedundantDeclarationCheck.cpp. What type shall I use for Parent instead? DynTypedNodeList::DynTypedNode ?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D49114
More information about the cfe-commits
mailing list