From: Jonas Toth Date: Wed, 9 Jan 2019 21:27:59 +0000 (+0000) Subject: [clang-tidy] another take at fixing doc X-Git-Tag: llvmorg-8.0.0-rc1~584 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a86d5c46e1fc308f5f8feadd923ecede8bd3a94b;p=platform%2Fupstream%2Fllvm.git [clang-tidy] another take at fixing doc llvm-svn: 350765 --- diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-nodiscard.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-nodiscard.rst index f35bf2d..3048db8 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-nodiscard.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-nodiscard.rst @@ -9,7 +9,10 @@ order to highlight at compile time which return values should not be ignored. Member functions need to satisfy the following conditions to be considered by this check: - - no ``[[nodiscard]]``, ``[[noreturn]]``, ``__attribute__((warn_unused_result))``, ``[[clang::warn_unused_result]]`` nor ``[[gcc::warn_unused_result]]`` attribute, + - no ``[[nodiscard]]``, ``[[noreturn]]``, + ``__attribute__((warn_unused_result))``, + ``[[clang::warn_unused_result]]`` nor ``[[gcc::warn_unused_result]]`` + attribute, - non-void return type, - non-template return types, - const member function, @@ -46,8 +49,8 @@ Options .. option:: ReplacementString -Specifies a macro to use instead of ``[[nodiscard]]``. This is useful when -maintaining source code that needs to compile with a pre-C++17 compiler. + Specifies a macro to use instead of ``[[nodiscard]]``. This is useful when + maintaining source code that needs to compile with a pre-C++17 compiler. Example ^^^^^^^ @@ -68,11 +71,12 @@ if the :option:`ReplacementString` option is set to `NO_DISCARD`. .. note:: -If the :option:`ReplacementString` is not a C++ attribute, but instead a macro, -then that macro must be defined in scope or the fix-it will not be applied. + If the :option:`ReplacementString` is not a C++ attribute, but instead a + macro, then that macro must be defined in scope or the fix-it will not be + applied. .. note:: - For alternative ``__attribute__`` syntax options to mark functions as - ``[[nodiscard]]`` in non-c++17 source code. - See https://clang.llvm.org/docs/AttributeReference.html#nodiscard-warn-unused-result + For alternative ``__attribute__`` syntax options to mark functions as + ``[[nodiscard]]`` in non-c++17 source code. + See https://clang.llvm.org/docs/AttributeReference.html#nodiscard-warn-unused-result