Quuxplusone added inline comments.
================ Comment at: docs/clang-tidy/checks/readability-magic-numbers.rst:11 + + double circleArea = 3.1415926535 * radius * radius; + ---------------- 0x8000-0000 wrote: > Eugene.Zelenko wrote: > > JonasToth wrote: > > > This example is good, but right now the code only checks for integer > > > literals. Maybe an integer example would be better? > > Please use .. code-block:: c++. Same for good example. > @JonasToth I raked my brain but I just can't come up with a short and > effective example. I haven't given up yet. A common "magic number" in real code would be something like ``` int get_answer() { if (cond) return x; return -1; // FILENOTFOUND } ``` 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