Author: eugenezelenko Date: Tue Apr 26 12:54:00 2016 New Revision: 267576 URL: http://llvm.org/viewvc/llvm-project?rev=267576&view=rev Log: [Release notes] Mention Clang-tidy misc-fold-init-type check.
Highlighting consistency in Clang-tidy misc-fold-init-type check documentation. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst clang-tools-extra/trunk/docs/clang-tidy/checks/misc-fold-init-type.rst Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=267576&r1=267575&r2=267576&view=diff ============================================================================== --- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original) +++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Tue Apr 26 12:54:00 2016 @@ -92,6 +92,12 @@ identified. The improvements since the Detects dangling references in value handlers like ``std::experimental::string_view``. +- New `misc-fold-init-type + <http://clang.llvm.org/extra/clang-tidy/checks/misc-fold-init-type.html>`_ check + + The check flags type mismatches in `folds` like ``std::accumulate`` that might + result in loss of precision. + - New `misc-forward-declaration-namespace <http://clang.llvm.org/extra/clang-tidy/checks/misc-forward-declaration-namespace.html>`_ check Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-fold-init-type.rst URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-fold-init-type.rst?rev=267576&r1=267575&r2=267576&view=diff ============================================================================== --- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-fold-init-type.rst (original) +++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-fold-init-type.rst Tue Apr 26 12:54:00 2016 @@ -5,13 +5,13 @@ misc-fold-init-type The check flags type mismatches in `folds <https://en.wikipedia.org/wiki/Fold_(higher-order_function)>`_ -like `std::accumulate` that might result in loss of precision. -`std::accumulate` folds an input range into an initial value using the type of -the latter, with `operator+` by default. This can cause loss of precision +like ``std::accumulate`` that might result in loss of precision. +``std::accumulate`` folds an input range into an initial value using the type of +the latter, with ``operator+`` by default. This can cause loss of precision through: - Truncation: The following code uses a floating point range and an int - initial value, so trucation wil happen at every application of `operator+` + initial value, so trucation wil happen at every application of ``operator+`` and the result will be `0`, which might not be what the user expected. .. code:: c++ _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits