-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #688 from github/michaelrfairhurst/fix-autosar-a1-…
…1-2-on-gcc-detect-suppress-warning-flag Detect compilations with no warnings when '-w' flag is present.
- Loading branch information
Showing
12 changed files
with
36 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- `A1-1-2` - `CompilerWarningLevelNotInCompliance.ql`: | ||
- Report non-compliance for compilations that use the error-suppressing `-w` flag. |
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 @@ | ||
| Wcast-function-type.cpp:0:0:0:0 | Wcast-function-type.cpp | No warning-level options were used in the compilation of 'Wcast-function-type.cpp'. | |
Empty file.
Empty file.
Empty file.
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,2 +1,14 @@ | ||
// semmle-extractor-options: --clang -std=c++14 -Wcast-function-type | ||
// COMPLIANT | ||
// COMPLIANT | ||
|
||
// NOTE: When tested with `codeql test run`, the test extractor provides `-w` | ||
// which overrides `-Wcast-function-type` and causes this test case to be | ||
// non-compliant. | ||
// | ||
// However, when tested with our compiler matrix tests, this test db is built | ||
// via `codeql database create --command="..."`, and the `-w` flag will NOT be | ||
// used. This means the `-Wcast-function-type` flag is active and the test case | ||
// is compliant. | ||
// | ||
// Therefore, the .expected file for this test expects non-compliance, and the | ||
// .expected.gcc and .expected.clang files expect this test to be compliant. |
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 @@ | ||
| Wall.cpp:0:0:0:0 | Wall.cpp | No warning-level options were used in the compilation of 'Wall.cpp'. | |
Empty file.
Empty file.
Empty file.
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,2 +1,12 @@ | ||
// semmle-extractor-options: --clang -std=c++14 -Wall | ||
// COMPLIANT | ||
// COMPLIANT | ||
|
||
// NOTE: When tested with `codeql test run`, the test extractor provides `-w` | ||
// which overrides `-Wall` and causes this test case to be non-compliant. | ||
// | ||
// However, when tested with our compiler matrix tests, this test db is built | ||
// via `codeql database create --command="..."`, and the `-w` flag will NOT be | ||
// used. This means the `-Wall` flag is active and the test case is compliant. | ||
// | ||
// Therefore, the .expected file for this test expects non-compliance, and the | ||
// .expected.gcc and .expected.clang files expect this test to be compliant. |