This repository has been archived by the owner on Apr 23, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename the clang-tidy safety module to be hicpp, for the High-Integri…
…ty C++ coding standard from PRQA. This commit renames all of the safety functionality to be hicpp, adds an appropriate LICENSE.TXT, and updates the documentation accordingly. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298229 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
3360740
commit f4a5bb6
Showing
13 changed files
with
57 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
clang-tidy/safety/CMakeLists.txt → clang-tidy/hicpp/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
------------------------------------------------------------------------------ | ||
clang-tidy High-Integrity C++ Files | ||
------------------------------------------------------------------------------ | ||
All clang-tidy files are licensed under the LLVM license with the following | ||
additions: | ||
|
||
Any file referencing a High-Integrity C++ Coding guideline: | ||
|
||
HIC++ Coding Standard as created by PRQA. | ||
|
||
Please see http://www.codingstandard.com/section/conditions-of-use/ for more | ||
information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.. title:: clang-tidy - hicpp-no-assembler | ||
|
||
hicpp-no-assembler | ||
=================== | ||
|
||
Check for assembler statements. No fix is offered. | ||
|
||
Inline assembler is forbidden by the `High Intergrity C++ Coding Standard | ||
<http://www.codingstandard.com/section/7-5-the-asm-declaration/>`_ | ||
as it restricts the portability of code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
9 changes: 4 additions & 5 deletions
9
test/clang-tidy/safety-no-assembler.cpp → test/clang-tidy/hicpp-no-assembler.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
// RUN: %check_clang_tidy %s safety-no-assembler %t | ||
// RUN: %check_clang_tidy %s hicpp-no-assembler %t | ||
|
||
__asm__(".symver foo, bar@v"); | ||
// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: do not use inline assembler in safety-critical code [safety-no-assembler] | ||
// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: do not use inline assembler in safety-critical code [hicpp-no-assembler] | ||
|
||
static int s asm("spam"); | ||
// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: do not use inline assembler in safety-critical code [safety-no-assembler] | ||
// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: do not use inline assembler in safety-critical code [hicpp-no-assembler] | ||
|
||
void f() { | ||
__asm("mov al, 2"); | ||
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not use inline assembler in safety-critical code [safety-no-assembler] | ||
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not use inline assembler in safety-critical code [hicpp-no-assembler] | ||
} | ||
|