Skip to content

[clang-tidy][NFC][DOC] Add missing HICPP rule id's #72553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

bjosv
Copy link
Contributor

@bjosv bjosv commented Nov 16, 2023

Add HICPP rule identities to the documentation for hicpp-avoid-c-arrays and hicpp-no-assembler.

Includes an update of hicpp-avoid-goto to look like other aliased checks.

References:

Add HICPP rule identities to the documentation for `hicpp-avoid-c-arrays`
and `hicpp-no-assembler`.
Includes an update of `hicpp-avoid-goto` to look like other aliased checks.

References:
* avoid-c-arrays
  Commit: 2634bd5
@llvmbot
Copy link
Member

llvmbot commented Nov 16, 2023

@llvm/pr-subscribers-clang-tidy

Author: Björn Svensson (bjosv)

Changes

Add HICPP rule identities to the documentation for hicpp-avoid-c-arrays and hicpp-no-assembler.

Includes an update of hicpp-avoid-goto to look like other aliased checks.

References:


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

3 Files Affected:

  • (modified) clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-c-arrays.rst (+1)
  • (modified) clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-goto.rst (+3-6)
  • (modified) clang-tools-extra/docs/clang-tidy/checks/hicpp/no-assembler.rst (+5-5)
diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-c-arrays.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-c-arrays.rst
index 5d125a89e7f4324..789235980ad7b78 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-c-arrays.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-c-arrays.rst
@@ -8,3 +8,4 @@ hicpp-avoid-c-arrays
 The hicpp-avoid-c-arrays check is an alias, please see
 :doc:`modernize-avoid-c-arrays <../modernize/avoid-c-arrays>`
 for more information.
+It partly enforces the `rule 4.1.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/standard-conversions>`_.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-goto.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-goto.rst
index ffef01ca5d4eb17..91ecaf0594d1f44 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-goto.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/hicpp/avoid-goto.rst
@@ -5,10 +5,7 @@
 hicpp-avoid-goto
 ================
 
-The `hicpp-avoid-goto` check is an alias to
+The `hicpp-avoid-goto` check is an alias, please see
 :doc:`cppcoreguidelines-avoid-goto <../cppcoreguidelines/avoid-goto>`.
-Rule `6.3.1 High Integrity C++ <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/statements>`_
-requires that ``goto`` only skips parts of a block and is not used for other
-reasons.
-
-Both coding guidelines implement the same exception to the usage of ``goto``.
+for more information.
+It enforces the `rule 6.3.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/statements>`_.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/hicpp/no-assembler.rst b/clang-tools-extra/docs/clang-tidy/checks/hicpp/no-assembler.rst
index 381fb365e800ea3..cfc6e9b6ec3477a 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/hicpp/no-assembler.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/hicpp/no-assembler.rst
@@ -1,10 +1,10 @@
 .. title:: clang-tidy - hicpp-no-assembler
 
 hicpp-no-assembler
-===================
+==================
 
-Check for assembler statements. No fix is offered.
+Checks for assembler statements. Use of inline assembly should be avoided since
+it restricts the portability of the code.
 
-Inline assembler is forbidden by the `High Integrity C++ Coding Standard
-<https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/declarations>`_
-as it restricts the portability of code.
+This enforces `rule 7.5.1 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/declarations>`_
+of the High Integrity C++ Coding Standard.

@PiotrZSL PiotrZSL merged commit 12bdbe2 into llvm:main Nov 17, 2023
@bjosv bjosv deleted the hicpp-docs branch November 20, 2023 08:13
sr-tream pushed a commit to sr-tream/llvm-project that referenced this pull request Nov 20, 2023
Add HICPP rule identities to the documentation for
`hicpp-avoid-c-arrays` and `hicpp-no-assembler`.

Includes an update of `hicpp-avoid-goto` to look like other aliased
checks.

References:
* avoid-c-arrays 
  Commit: 2634bd5
zahiraam pushed a commit to zahiraam/llvm-project that referenced this pull request Nov 20, 2023
Add HICPP rule identities to the documentation for
`hicpp-avoid-c-arrays` and `hicpp-no-assembler`.

Includes an update of `hicpp-avoid-goto` to look like other aliased
checks.

References:
* avoid-c-arrays 
  Commit: 2634bd5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants