[clang-tidy] another take at fixing doc
authorJonas Toth <jonas.toth@gmail.com>
Wed, 9 Jan 2019 21:27:59 +0000 (21:27 +0000)
committerJonas Toth <jonas.toth@gmail.com>
Wed, 9 Jan 2019 21:27:59 +0000 (21:27 +0000)
llvm-svn: 350765

clang-tools-extra/docs/clang-tidy/checks/modernize-use-nodiscard.rst

index f35bf2d..3048db8 100644 (file)
@@ -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