[PATCH] D52892: [Clang-tidy] readability check to convert numerical constants to std::numeric_limits

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 12 06:27:43 PDT 2018


aaron.ballman added a comment.

I like the thrust of this check, but we already have the readability-magic-numbers check and I think that this functionality would fit naturally there. That check finds numerical constants and recommends turning them into named constants, but for special values it seems reasonable to recommend using `numeric_limits` instead. What do others think of that, from an organizational perspective?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52892





More information about the cfe-commits mailing list