-
Notifications
You must be signed in to change notification settings - Fork 66
Fix #370 #515
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
rvermeulen
merged 14 commits into
github:main
from
rvermeulen:rvermeulen/fix-issue-#311
Feb 27, 2024
Merged
Fix #370 #515
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d9b41d2
Include non-member assignment operators
rvermeulen c5fe049
Add stream insertion and extraction operators
rvermeulen 00fa760
Change definition of out parameter and add exclusions
rvermeulen 0b04a75
Add changenote
rvermeulen e54b4c5
Add missing predicate `isLValueRefQualified`
rvermeulen a10476f
Annotate compliant case
rvermeulen ef8c9be
Reuse and extend existing modelling
rvermeulen 9ca33f3
Apply correct query format
rvermeulen 2cbb152
Apply query formatting
rvermeulen e826932
Merge branch 'main' into rvermeulen/fix-issue-#311
rvermeulen 62f560f
Merge branch 'main' into rvermeulen/fix-issue-#311
rvermeulen ad26759
Add queries impacted by broadened definitions of `IStream` type.
rvermeulen 4225420
Merge branch 'main' into rvermeulen/fix-issue-#311
rvermeulen ad49b87
Merge branch 'main' into rvermeulen/fix-issue-#311
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,7 @@ | ||
- `A8-4-8` - `OutParametersUsed.ql` | ||
- Fixes #370 - Non-member user-defined assignment operator and stream insertion/extraction parameters that are required to be out parameters are excluded. | ||
- Broadens the definition of out parameter by considering assignment and crement operators as modifications to an out parameter candidate. | ||
- `FIO51-CPP` - `CloseFilesWhenTheyAreNoLongerNeeded.ql`: | ||
- Broadened definition of `IStream` and `OStream` types may result in reduced false negatives. | ||
- `A5-1-1` - `LiteralValueUsedOutsideTypeInit.ql`: | ||
- Broadened definition of `IStream` types may result in reduced false positives because more file stream function calls may be detected as logging operations that will be excluded from the results. |
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
11 changes: 6 additions & 5 deletions
11
cpp/autosar/test/rules/A8-4-8/OutputParametersUsed.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,6 @@ | ||
| test.cpp:5:22:5:24 | str | Out parameter str that is modified before being read. | | ||
| test.cpp:16:14:16:14 | i | Out parameter i that is modified before being read. | | ||
| test.cpp:21:14:21:14 | i | Out parameter i that is modified before being read. | | ||
| test.cpp:29:12:29:12 | a | Out parameter a that is modified before being read. | | ||
| test.cpp:33:12:33:12 | a | Out parameter a that is modified before being read. | | ||
| test.cpp:5:22:5:24 | str | Out parameter 'str' used. | | ||
| test.cpp:8:22:8:24 | str | Out parameter 'str' used. | | ||
| test.cpp:16:14:16:14 | i | Out parameter 'i' used. | | ||
| test.cpp:21:14:21:14 | i | Out parameter 'i' used. | | ||
| test.cpp:29:12:29:12 | a | Out parameter 'a' used. | | ||
| test.cpp:33:12:33:12 | a | Out parameter 'a' used. | |
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
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.