diff options
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy/checks/misc-unused-raii.rst')
-rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/misc-unused-raii.rst | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-unused-raii.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-unused-raii.rst index 112073dcbd3..d081702b3af 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/misc-unused-raii.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/misc-unused-raii.rst @@ -3,12 +3,11 @@ misc-unused-raii ================ - Finds temporaries that look like RAII objects. The canonical example for this is a scoped lock. -.. code:: c++ +.. code-block:: c++ { scoped_lock(&global_mutex); @@ -21,8 +20,11 @@ entered, leaving it unprotected. We apply a number of heuristics to reduce the false positive count of this check: - * Ignore code expanded from macros. Testing frameworks make heavy use of this. - * Ignore types with trivial destructors. They are very unlikely to be RAII - objects and there's no difference when they are deleted. - * Ignore objects at the end of a compound statement (doesn't change behavior). - * Ignore objects returned from a call. +- Ignore code expanded from macros. Testing frameworks make heavy use of this. + +- Ignore types with trivial destructors. They are very unlikely to be RAII + objects and there's no difference when they are deleted. + +- Ignore objects at the end of a compound statement (doesn't change behavior). + +- Ignore objects returned from a call. |