-
Notifications
You must be signed in to change notification settings - Fork 66
Resolve 371 #538
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
Resolve 371 #538
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b19874a
Exclude literals that are the result of constexpr variable uses.
rvermeulen 5f90fae
Exclude literals used in class template instantiation
rvermeulen b79e986
Format alert according to style-guide
rvermeulen 9109b3c
Add changenote
rvermeulen 5bbe64c
Merge branch 'main' into rvermeulen/fix-371
rvermeulen eb13914
Exclude boolean literals used as non-type template arguments
rvermeulen 28ac4c1
Extend excluded char literals with char16_t and char32_t
rvermeulen 00d36a7
Exclude bool literals and char literals instead of types
rvermeulen 24b4a00
Document assumption underlying `CompileTimeComputedIntegralLiteral`
rvermeulen ba39b68
Exclude literals part of a class aggregate literal
rvermeulen 9a9138a
Extend test cases
rvermeulen e1521ad
Add comment describing exclusion of compile time float literals
rvermeulen 226c9f5
Update changenote
rvermeulen 7b4c73a
Format query module.
rvermeulen 3b3fca0
Format module
rvermeulen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,4 @@ | ||
- `A5-1-1` - `LiteralValueUsedOutsideTypeInit.ql`: | ||
- Address FP reported in #371. Exclude literals generated by uses of constexpr variables. | ||
- Exclude literals used in class template instantiations. | ||
- Update the alert message to adhere to the style-guide. |
This file contains hidden or 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
13 changes: 8 additions & 5 deletions
13
cpp/autosar/test/rules/A5-1-1/LiteralValueUsedOutsideTypeInit.expected
This file contains hidden or 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,5 +1,8 @@ | ||
| test.cpp:5:9:5:25 | constant string | Literal value "constant string" used outside of type initialization StringLiteral | | ||
| test.cpp:14:23:14:25 | 100 | Literal value 100 used outside of type initialization Literal | | ||
| test.cpp:54:7:54:7 | 1 | Literal value 1 used outside of type initialization Literal | | ||
| test.cpp:75:23:75:28 | test | Literal value "test" used outside of type initialization StringLiteral | | ||
| test.cpp:76:19:76:28 | not okay | Literal value "not okay" used outside of type initialization StringLiteral | | ||
| test.cpp:5:9:5:25 | constant string | Literal value '"constant string"' used outside of type initialization. | | ||
| test.cpp:14:23:14:25 | 100 | Literal value '100' used outside of type initialization. | | ||
| test.cpp:54:7:54:7 | 1 | Literal value '1' used outside of type initialization. | | ||
| test.cpp:75:23:75:28 | test | Literal value '"test"' used outside of type initialization. | | ||
| test.cpp:76:19:76:28 | not okay | Literal value '"not okay"' used outside of type initialization. | | ||
| test.cpp:104:8:104:8 | 4 | Literal value '4' used outside of type initialization. | | ||
| test.cpp:104:8:104:8 | 4 | Literal value '4' used outside of type initialization. | | ||
| test.cpp:104:8:104:8 | 4 | Literal value '4' used outside of type initialization. | |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.