[clang-tools-extra] [clang-tidy][NFC] Fix `linuxkernel-must-check-errs` documentation file name (PR #88655)

2024-04-15 Thread via cfe-commits

https://github.com/whisperity closed 
https://github.com/llvm/llvm-project/pull/88655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [clang-tidy][NFC] Fix `linuxkernel-must-check-errs` documentation file name (PR #88655)

2024-04-15 Thread Piotr Zegar via cfe-commits


@@ -299,6 +299,10 @@ Miscellaneous
   ``--format`` option is specified. Now :program:`clang-apply-replacements`
   applies formatting only with the option.
 
+- Fixed the :doc:`linuxkernel-must-check-errs
+  ` documentation to 
consistently
+  use the check's proper name.

PiotrZSL wrote:

And none one cared. If you really like to keep it then fine, I'm not pushing 
but usually in change notes we got only changes in checks behaviour.

https://github.com/llvm/llvm-project/pull/88655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [clang-tidy][NFC] Fix `linuxkernel-must-check-errs` documentation file name (PR #88655)

2024-04-14 Thread via cfe-commits


@@ -299,6 +299,10 @@ Miscellaneous
   ``--format`` option is specified. Now :program:`clang-apply-replacements`
   applies formatting only with the option.
 
+- Fixed the :doc:`linuxkernel-must-check-errs
+  ` documentation to 
consistently
+  use the check's proper name.

whisperity wrote:

Are you sure it's not worth it? The documentation has been misleading for 
almost 5 years at this point.

https://github.com/llvm/llvm-project/pull/88655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [clang-tidy][NFC] Fix `linuxkernel-must-check-errs` documentation file name (PR #88655)

2024-04-14 Thread Piotr Zegar via cfe-commits


@@ -299,6 +299,10 @@ Miscellaneous
   ``--format`` option is specified. Now :program:`clang-apply-replacements`
   applies formatting only with the option.
 
+- Fixed the :doc:`linuxkernel-must-check-errs
+  ` documentation to 
consistently
+  use the check's proper name.

PiotrZSL wrote:

No release notes needed for documentation changes.

https://github.com/llvm/llvm-project/pull/88655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [clang-tidy][NFC] Fix `linuxkernel-must-check-errs` documentation file name (PR #88655)

2024-04-14 Thread Piotr Zegar via cfe-commits

https://github.com/PiotrZSL approved this pull request.


https://github.com/llvm/llvm-project/pull/88655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [clang-tidy][NFC] Fix `linuxkernel-must-check-errs` documentation file name (PR #88655)

2024-04-14 Thread Piotr Zegar via cfe-commits

https://github.com/PiotrZSL edited 
https://github.com/llvm/llvm-project/pull/88655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [clang-tidy][NFC] Fix `linuxkernel-must-check-errs` documentation file name (PR #88655)

2024-04-14 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang-tidy

Author: None (whisperity)


Changes

The check was originally introduced in commit 
fc8c65b2e11d21b1c0ce070cc0a4ee031a542dae 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.

---
Full diff: https://github.com/llvm/llvm-project/pull/88655.diff


4 Files Affected:

- (modified) clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h 
(+1-8) 
- (modified) clang-tools-extra/docs/ReleaseNotes.rst (+4) 
- (renamed) 
clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-check-errs.rst (+3-3) 
- (modified) clang-tools-extra/docs/clang-tidy/checks/list.rst (+1-1) 


``diff
diff --git a/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h 
b/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h
index f08fed47983924..7406aaead836e0 100644
--- a/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h
+++ b/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h
@@ -17,15 +17,8 @@ namespace clang::tidy::linuxkernel {
 /// 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.
-///
 /// For the user-facing documentation see:
-/// 
http://clang.llvm.org/extra/clang-tidy/checks/linuxkernel/must-use-errs.html
+/// 
http://clang.llvm.org/extra/clang-tidy/checks/linuxkernel/must-check-errs.html
 class MustCheckErrsCheck : public ClangTidyCheck {
 public:
   MustCheckErrsCheck(StringRef Name, ClangTidyContext *Context)
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst 
b/clang-tools-extra/docs/ReleaseNotes.rst
index 1405fb0df1f8dd..4dfbd8ca49ab9b 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -299,6 +299,10 @@ Miscellaneous
   ``--format`` option is specified. Now :program:`clang-apply-replacements`
   applies formatting only with the option.
 
+- Fixed the :doc:`linuxkernel-must-check-errs
+  ` documentation to 
consistently
+  use the check's proper name.
+
 Improvements to include-fixer
 -
 
diff --git 
a/clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-use-errs.rst 
b/clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-check-errs.rst
similarity index 88%
rename from 
clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-use-errs.rst
rename to 
clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-check-errs.rst
index 8a85426880987e..cef5a70db309e1 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-use-errs.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-check-errs.rst
@@ -1,7 +1,7 @@
-.. title:: clang-tidy - linuxkernel-must-use-errs
+.. title:: clang-tidy - linuxkernel-must-check-errs
 
-linuxkernel-must-use-errs
-=
+linuxkernel-must-check-errs
+===
 
 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
diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst 
b/clang-tools-extra/docs/clang-tidy/checks/list.rst
index 188a42bfddd383..8bc46acad56c84 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -233,7 +233,7 @@ Clang-Tidy Checks
:doc:`hicpp-multiway-paths-covered `,
:doc:`hicpp-no-assembler `,
:doc:`hicpp-signed-bitwise `,
-   :doc:`linuxkernel-must-use-errs `,
+   :doc:`linuxkernel-must-check-errs `,
:doc:`llvm-header-guard `,
:doc:`llvm-include-order `, "Yes"
:doc:`llvm-namespace-comment `,

``




https://github.com/llvm/llvm-project/pull/88655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [clang-tidy][NFC] Fix `linuxkernel-must-check-errs` documentation file name (PR #88655)

2024-04-14 Thread via cfe-commits

https://github.com/whisperity created 
https://github.com/llvm/llvm-project/pull/88655

The check was originally introduced in commit 
fc8c65b2e11d21b1c0ce070cc0a4ee031a542dae 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.

>From 3d42376ed3ac6d73cd6d6152d5029e439e9c2bf1 Mon Sep 17 00:00:00 2001
From: Whisperity 
Date: Sun, 14 Apr 2024 12:37:58 +0200
Subject: [PATCH] [clang-tidy] Fix `linuxkernel-must-check-errs` documentation
 file name

The check was originally introduced 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.
---
 .../clang-tidy/linuxkernel/MustCheckErrsCheck.h  | 9 +
 clang-tools-extra/docs/ReleaseNotes.rst  | 4 
 .../{must-use-errs.rst => must-check-errs.rst}   | 6 +++---
 clang-tools-extra/docs/clang-tidy/checks/list.rst| 2 +-
 4 files changed, 9 insertions(+), 12 deletions(-)
 rename clang-tools-extra/docs/clang-tidy/checks/linuxkernel/{must-use-errs.rst 
=> must-check-errs.rst} (88%)

diff --git a/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h 
b/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h
index f08fed47983924..7406aaead836e0 100644
--- a/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h
+++ b/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h
@@ -17,15 +17,8 @@ namespace clang::tidy::linuxkernel {
 /// 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.
-///
 /// For the user-facing documentation see:
-/// 
http://clang.llvm.org/extra/clang-tidy/checks/linuxkernel/must-use-errs.html
+/// 
http://clang.llvm.org/extra/clang-tidy/checks/linuxkernel/must-check-errs.html
 class MustCheckErrsCheck : public ClangTidyCheck {
 public:
   MustCheckErrsCheck(StringRef Name, ClangTidyContext *Context)
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst 
b/clang-tools-extra/docs/ReleaseNotes.rst
index 1405fb0df1f8dd..4dfbd8ca49ab9b 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -299,6 +299,10 @@ Miscellaneous
   ``--format`` option is specified. Now :program:`clang-apply-replacements`
   applies formatting only with the option.
 
+- Fixed the :doc:`linuxkernel-must-check-errs
+  ` documentation to 
consistently
+  use the check's proper name.
+
 Improvements to include-fixer
 -
 
diff --git 
a/clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-use-errs.rst 
b/clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-check-errs.rst
similarity index 88%
rename from 
clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-use-errs.rst
rename to 
clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-check-errs.rst
index 8a85426880987e..cef5a70db309e1 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-use-errs.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/linuxkernel/must-check-errs.rst
@@ -1,7 +1,7 @@
-.. title:: clang-tidy - linuxkernel-must-use-errs
+.. title:: clang-tidy - linuxkernel-must-check-errs
 
-linuxkernel-must-use-errs
-=
+linuxkernel-must-check-errs
+===
 
 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
diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst 
b/clang-tools-extra/docs/clang-tidy/checks/list.rst
index 188a42bfddd383..8bc46acad56c84 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -233,7 +233,7 @@ Clang-Tidy Checks
:doc:`hicpp-multiway-paths-covered `,
:doc:`hicpp-no-assembler `,
:doc:`hicpp-signed-bitwise `,
-   :doc:`linuxkernel-must-use-errs `,
+   :doc:`linuxkernel-must-check-errs `,
:doc:`llvm-header-guard `,
:doc:`llvm-include-order `, "Yes"
:doc:`llvm-namespace-comment `,

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits