[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 31 04:45:03 PDT 2018

0x8000-0000 added a comment.

The state of this patch:

- user interface is as agreed-upon, giving end-users the capability to filter out floats and ints as it makes sense for their code base
- code is clean
- documentation is up to date
- default ignore lists are sensible

There is one outstanding improvement request - to combine the two float/double lists into a single APFloat but that requires more refactoring outside this check and the benefit lies mainly in a future extensibility and the saving of a couple hundred bytes.

@aaron.ballman - can we get this merged as-is and improve it later? I'd like to see this check available in Clang7.

  rCTE Clang Tools Extra


More information about the cfe-commits mailing list