diff options
author | Jonas Toth <jonas.toth@gmail.com> | 2019-01-09 21:27:59 +0000 |
---|---|---|
committer | Jonas Toth <jonas.toth@gmail.com> | 2019-01-09 21:27:59 +0000 |
commit | 27277f08fc1c962a372bf2c840ed7674e82b4a88 (patch) | |
tree | 5f1f382206086c2b2570a892227faf6b09f51503 /clang-tools-extra/docs | |
parent | fe2685161f84f833832f6439d55c40277bb878a1 (diff) |
[clang-tidy] another take at fixing doc
Diffstat (limited to 'clang-tools-extra/docs')
-rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/modernize-use-nodiscard.rst | 20 |
1 files changed, 12 insertions, 8 deletions
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 f35bf2d4d5b..3048db8682a 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 |