[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 24 19:00:38 PDT 2018


Eugene.Zelenko added inline comments.


================
Comment at: clang-tidy/readability/MagicNumbersCheck.h:42
+    return false;
+  };
+  bool isSyntheticValue(const clang::SourceManager *SourceManager,
----------------
Unnecessary semicolon. Please also add empty line after.


================
Comment at: docs/clang-tidy/checks/readability-magic-numbers.rst:55
+
+By default only 0, 1 and -1 integer values are accepted without a warning.
+This can be overriden with the 'IgnoredIntegerValues' option.  In addition,
----------------
Please enclose numbers in `. Same for 0.0.


================
Comment at: docs/clang-tidy/checks/readability-magic-numbers.rst:56
+By default only 0, 1 and -1 integer values are accepted without a warning.
+This can be overriden with the 'IgnoredIntegerValues' option.  In addition,
+the 0.0 floating point value is accepted. There is no configuration for
----------------
Please use `.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D49114





More information about the cfe-commits mailing list