Add a new check to the readability module that flags uses of "magic numbers" (both...
authorAaron Ballman <aaron@aaronballman.com>
Sun, 12 Aug 2018 14:35:13 +0000 (14:35 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Sun, 12 Aug 2018 14:35:13 +0000 (14:35 +0000)
commitbc8f5ac7541c863f83b53ed819292d79882ffe67
treefec4d85effc5fbac5bb39cbedbdf7fc284dbfb5a
parentbae6aab6fbe9fb655dd0f87d5075f4fc25d96491
Add a new check to the readability module that flags uses of "magic numbers" (both floating-point and integral).

Patch by Florin Iucha <florin@signbit.net>

llvm-svn: 339516
clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tools-extra/clang-tidy/readability/CMakeLists.txt
clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.h [new file with mode: 0644]
clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-avoid-magic-numbers.rst [new file with mode: 0644]
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/readability-magic-numbers.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/readability-magic-numbers.cpp [new file with mode: 0644]