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 | d923f1bdb694639b14585c0b544614722f23bb5e (patch) | |
tree | 1f753947c286189f0deaf7f6a3bd2aa03c7bb7c9 | |
parent | 4ed34a30b599d3e776885ed6a29f9a1f5960294a (diff) |
[clang-tidy] another take at fixing doc
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@350765 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | docs/clang-tidy/checks/modernize-use-nodiscard.rst | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/docs/clang-tidy/checks/modernize-use-nodiscard.rst b/docs/clang-tidy/checks/modernize-use-nodiscard.rst index f35bf2d4..3048db86 100644 --- a/docs/clang-tidy/checks/modernize-use-nodiscard.rst +++ b/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 |