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 | a86d5c46e1fc308f5f8feadd923ecede8bd3a94b (patch) | |
| tree | 2ac0a57ad1fe91f119cc4e03a3f172eb97254c67 | |
| parent | c68925aba32d5ccaa5693633814e4c8b15d855d2 (diff) | |
| download | bcm5719-llvm-a86d5c46e1fc308f5f8feadd923ecede8bd3a94b.tar.gz bcm5719-llvm-a86d5c46e1fc308f5f8feadd923ecede8bd3a94b.zip | |
[clang-tidy] another take at fixing doc
llvm-svn: 350765
| -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 |

