aaron.ballman added inline comments.
================ Comment at: docs/clang-tidy/checks/readability-magic-numbers.rst:61-63 +configuration for accepted floating point values, primarily because most +floating point comparisons are not exact, and some of the exact ones are not +portable. ---------------- 0x8000-0000 wrote: > aaron.ballman wrote: > > I am curious to know how true this is. You got some data for integer values > > and reported it, but I'm wondering if you've tried the same experiment with > > floating-point numbers? > The problem with the floating point numbers as text is: they need to be > parsed both from the configuration and from the source code _then_ compared. > What is an acceptable epsilon? I don't know. Is the same epsilon acceptable > on all source code? I don't know. Yeah, I'm not too worried about the situations in which the epsilon matters. I'm more worried that we'll see a lot of 1.0, 2.0 floating-point literals where the floating-point value is a nice, round, easy-to-represent number but users have no way to disable this diagnostic short of `const float Two = 2.0f;` Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits