[PATCH] D65343: [clang-tidy] Fix the documentation for linuxkernel-must-use-errs.
Tom Roeder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 30 09:49:03 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL367333: [clang-tidy] Fix the documentation for linuxkernel-must-use-errs. (authored by tmroeder, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D65343?vs=212201&id=212373#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65343/new/
https://reviews.llvm.org/D65343
Files:
clang-tools-extra/trunk/docs/ReleaseNotes.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/linuxkernel-must-use-errs.rst
Index: clang-tools-extra/trunk/docs/ReleaseNotes.rst
===================================================================
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst
@@ -71,15 +71,7 @@
<clang-tidy/checks/linuxkernel-must-use-errs>` check.
Checks Linux kernel code to see if it uses the results from the functions in
- ``linux/err.h``. Also checks to see if code uses the results from functions that
- directly return a value from one of these error functions.
-
- This is important in the Linux kernel because ``ERR_PTR``, ``PTR_ERR``,
- ``IS_ERR``, ``IS_ERR_OR_NULL``, ``ERR_CAST``, and ``PTR_ERR_OR_ZERO`` return
- values must be checked, since positive pointers and negative error codes are
- being used in the same context. These functions are marked with
- ``__attribute__((warn_unused_result))``, but some kernel versions do not have
- this warning enabled for clang.
+ ``linux/err.h``.
- New :doc:`google-upgrade-googletest-case
<clang-tidy/checks/google-upgrade-googletest-case>` check.
Index: clang-tools-extra/trunk/docs/clang-tidy/checks/linuxkernel-must-use-errs.rst
===================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/linuxkernel-must-use-errs.rst
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/linuxkernel-must-use-errs.rst
@@ -3,14 +3,16 @@
linuxkernel-must-use-errs
=========================
-Checks for cases where the kernel error functions ``ERR_PTR``,
-``PTR_ERR``, ``IS_ERR``, ``IS_ERR_OR_NULL``, ``ERR_CAST``, and
-``PTR_ERR_OR_ZERO`` are called but the results are not used. These
-functions are marked with ``__attribute__((warn_unused_result))``, but
-the compiler warning for this attribute is not always enabled.
-
-This also checks for unused values returned by functions that return
-``ERR_PTR``.
+Checks Linux kernel code to see if it uses the results from the functions in
+``linux/err.h``. Also checks to see if code uses the results from functions that
+directly return a value from one of these error functions.
+
+This is important in the Linux kernel because ``ERR_PTR``, ``PTR_ERR``,
+``IS_ERR``, ``IS_ERR_OR_NULL``, ``ERR_CAST``, and ``PTR_ERR_OR_ZERO`` return
+values must be checked, since positive pointers and negative error codes are
+being used in the same context. These functions are marked with
+``__attribute__((warn_unused_result))``, but some kernel versions do not have
+this warning enabled for clang.
Examples:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65343.212373.patch
Type: text/x-patch
Size: 2522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190730/88454251/attachment.bin>
More information about the llvm-commits
mailing list