[clang-tools-extra] r350765 - [clang-tidy] another take at fixing doc
Jonas Toth via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 9 13:27:59 PST 2019
Author: jonastoth
Date: Wed Jan 9 13:27:59 2019
New Revision: 350765
URL: http://llvm.org/viewvc/llvm-project?rev=350765&view=rev
Log:
[clang-tidy] another take at fixing doc
Modified:
clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-nodiscard.rst
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-nodiscard.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-nodiscard.rst?rev=350765&r1=350764&r2=350765&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-nodiscard.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-nodiscard.rst Wed Jan 9 13:27:59 2019
@@ -9,7 +9,10 @@ order to highlight at compile time which
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` optio
.. 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
More information about the cfe-commits
mailing list