summaryrefslogtreecommitdiff
path: root/clang-tools-extra/docs
diff options
context:
space:
mode:
authorJonas Toth <jonas.toth@gmail.com>2019-01-09 21:19:44 +0000
committerJonas Toth <jonas.toth@gmail.com>2019-01-09 21:19:44 +0000
commitc7715e8cb202ba2085d9baf4c570638582785499 (patch)
treecc8e1b58b62e6f03e9ede3ef510c21b727e3b098 /clang-tools-extra/docs
parente26760b4ffcc08d4f5c66c54a312bd5b28b63905 (diff)
[clang-tidy] tryfix documentation build
Diffstat (limited to 'clang-tools-extra/docs')
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/modernize-use-nodiscard.rst25
1 files changed, 13 insertions, 12 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 88507e8e9ab..f35bf2d4d5b 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
@@ -8,18 +8,19 @@ 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,
- - non-void return type,
- - non-template return types,
- - const member function,
- - non-variadic functions,
- - no non-const reference parameters,
- - no pointer parameters,
- - no template parameters,
- - no template function parameters,
- - not be a member of a class with mutable member variables,
- - no Lambdas,
- - no conversion functions.
+
+ - 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,
+ - non-variadic functions,
+ - no non-const reference parameters,
+ - no pointer parameters,
+ - no template parameters,
+ - no template function parameters,
+ - not be a member of a class with mutable member variables,
+ - no Lambdas,
+ - no conversion functions.
Such functions have no means of altering any state or passing values other than
via the return type. Unless the member functions are altering state via some