Skip to content

Commit a269195

Browse files
authored
[clang-tidy][NFC] Fix linuxkernel-must-check-errs documentation file name (llvm#88655)
The check was originally introduced in commit fc8c65b with conflicting names, likely as a result of a partial rename, with the name in the documentation (`linuxkernel-must-use-errs`) not matching the name of the check as configured by users.
1 parent 7e4c6e9 commit a269195

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h

+1-8
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,8 @@ namespace clang::tidy::linuxkernel {
1717
/// linux/err.h. Also checks to see if code uses the results from functions that
1818
/// directly return a value from one of these error functions.
1919
///
20-
/// This is important in the Linux kernel because ERR_PTR, PTR_ERR, IS_ERR,
21-
/// IS_ERR_OR_NULL, ERR_CAST, and PTR_ERR_OR_ZERO return values must be checked,
22-
/// since positive pointers and negative error codes are being used in the same
23-
/// context. These functions are marked with
24-
/// __attribute__((warn_unused_result)), but some kernel versions do not have
25-
/// this warning enabled for clang.
26-
///
2720
/// For the user-facing documentation see:
28-
/// http://clang.llvm.org/extra/clang-tidy/checks/linuxkernel/must-use-errs.html
21+
/// http://clang.llvm.org/extra/clang-tidy/checks/linuxkernel/must-check-errs.html
2922
class MustCheckErrsCheck : public ClangTidyCheck {
3023
public:
3124
MustCheckErrsCheck(StringRef Name, ClangTidyContext *Context)

clang-tools-extra/docs/ReleaseNotes.rst

+4
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@ Miscellaneous
303303
``--format`` option is specified. Now :program:`clang-apply-replacements`
304304
applies formatting only with the option.
305305

306+
- Fixed the :doc:`linuxkernel-must-check-errs
307+
<clang-tidy/checks/linuxkernel/must-check-errs>` documentation to consistently
308+
use the check's proper name.
309+
306310
Improvements to include-fixer
307311
-----------------------------
308312

clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-use-errs.rst renamed to clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-check-errs.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.. title:: clang-tidy - linuxkernel-must-use-errs
1+
.. title:: clang-tidy - linuxkernel-must-check-errs
22

3-
linuxkernel-must-use-errs
4-
=========================
3+
linuxkernel-must-check-errs
4+
===========================
55

66
Checks Linux kernel code to see if it uses the results from the functions in
77
``linux/err.h``. Also checks to see if code uses the results from functions that

clang-tools-extra/docs/clang-tidy/checks/list.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Clang-Tidy Checks
233233
:doc:`hicpp-multiway-paths-covered <hicpp/multiway-paths-covered>`,
234234
:doc:`hicpp-no-assembler <hicpp/no-assembler>`,
235235
:doc:`hicpp-signed-bitwise <hicpp/signed-bitwise>`,
236-
:doc:`linuxkernel-must-use-errs <linuxkernel/must-use-errs>`,
236+
:doc:`linuxkernel-must-check-errs <linuxkernel/must-check-errs>`,
237237
:doc:`llvm-header-guard <llvm/header-guard>`,
238238
:doc:`llvm-include-order <llvm/include-order>`, "Yes"
239239
:doc:`llvm-namespace-comment <llvm/namespace-comment>`,

0 commit comments

Comments
 (0)