-
Notifications
You must be signed in to change notification settings - Fork 67
Sorting out false positives for A0-1-2 and A0-1-4 #181
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
Changes from 12 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
7462ec8
create test.cpp
jeongsoolee09 3bdc76d
delete test.cpp
jeongsoolee09 47805d8
update
jeongsoolee09 aca8fdc
checkpoint: A0-1-2
jeongsoolee09 54886ef
update test.cpp and tuple.h
jeongsoolee09 7b93bb8
First draft of UnusedReturnValue
jeongsoolee09 c59d66e
minor formatting for qldoc
jeongsoolee09 714e04c
revise A0-1-2 to also match VoidType
jeongsoolee09 b1e204d
minor comment fix
jeongsoolee09 a1eed75
add test.cpp for A0-1-4
jeongsoolee09 09ab74e
checkpoint: attempt to catch unused parameters in lambdaexpr
jeongsoolee09 23a1bc3
Finalize A0-1-4 except finding a good fName
jeongsoolee09 51ff26c
clang-format
jeongsoolee09 1ff8c86
format UnusedReturnValue.ql
jeongsoolee09 0a96640
clean up namespace, distinguish between lambda param and function params
jeongsoolee09 84176bc
factor out duplicate conditions and update .expected for A0-1-4
jeongsoolee09 8c6c581
update tuple.h
jeongsoolee09 d15b6db
Merge branch 'main' into jeongsoolee09/a0-1-2_and_a0-1-4
jeongsoolee09 a1740e7
Add bitwise-shift-left-assignment operator
jeongsoolee09 058ccb4
Make query for A0-1-2 more concise
jeongsoolee09 b89c564
Remove lambda checks on UnusedParameters.qll
jeongsoolee09 1212108
Remove assignment to std::ignore
jeongsoolee09 4cd1fc4
Merge branch 'main' into jeongsoolee09/a0-1-2_and_a0-1-4
jeongsoolee09 9a9c531
Incorporating suggestions (1): compressing formulas into one
jeongsoolee09 b14b55c
Incorporating suggestions (2): updating comments
jeongsoolee09 b59d5e9
Incorporating suggestions (3): delete redundant comment
jeongsoolee09 611056c
Merge branch 'jeongsoolee09/a0-1-2_and_a0-1-4' of github.com:github/c…
jeongsoolee09 349f84f
Merge branch 'main' into jeongsoolee09/a0-1-2_and_a0-1-4
jeongsoolee09 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
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 +1 @@ | ||
| test.cpp:10:3:10:3 | call to f | Return value from call to $@ is unused. | test.cpp:1:5:1:5 | f | f | | ||
| test.cpp:12:3:12:3 | call to f | Return value from call to $@ is unused. | test.cpp:3:5:3:5 | f | f | |
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
54 changes: 35 additions & 19 deletions
54
cpp/common/src/codingstandards/cpp/deadcode/UnusedParameters.qll
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
namespace std { | ||
template <class... Types> class tuple {}; | ||
template <class... Types> std::tuple<Types...> make_tuple(Types &&...args); | ||
// TODO change this to example from cpp standard | ||
struct ignore_t { | ||
template <typename T> | ||
constexpr // required since C++14 | ||
void | ||
operator=(T &&) const noexcept {} | ||
}; | ||
inline constexpr std::ignore_t ignore; // 'const' only until C++17 | ||
} // namespace std |
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.