-
Notifications
You must be signed in to change notification settings - Fork 1.8k
C++: Fix some Ql4Ql violations. #20325
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
+127
−86
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
category: deprecated | ||
--- | ||
* The predicate `getAContructorCall` in the class `SslContextClass` has been deprecated. Use `getAConstructorCall` instead. |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,12 +164,17 @@ predicate valueOccurrenceCount(string value, int n) { | |
n > 20 | ||
} | ||
|
||
predicate occurenceCount(Literal lit, string value, int n) { | ||
predicate occurrenceCount(Literal lit, string value, int n) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs a change note. |
||
valueOccurrenceCount(value, n) and | ||
value = lit.getValue() and | ||
nonTrivialValue(_, lit) | ||
} | ||
|
||
/** | ||
* DEPRECATED: Use `occurrenceCount` instead. | ||
*/ | ||
deprecated predicate occurenceCount = occurrenceCount/3; | ||
|
||
/* | ||
* Literals repeated frequently | ||
*/ | ||
|
@@ -178,7 +183,7 @@ predicate check(Literal lit, string value, int n, File f) { | |
// Check that the literal is nontrivial | ||
not trivial(lit) and | ||
// Check that it is repeated a number of times | ||
occurenceCount(lit, value, n) and | ||
occurrenceCount(lit, value, n) and | ||
n > 20 and | ||
f = lit.getFile() and | ||
// Exclude generated files | ||
|
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 |
---|---|---|
|
@@ -128,11 +128,18 @@ abstract class LeapYearFieldAccess extends YearFieldAccess { | |
/** | ||
* Holds if the top-level binary operation includes an addition or subtraction operator with an operand specified by `valueToCheck`. | ||
*/ | ||
predicate additionalAdditionOrSubstractionCheckForLeapYear(int valueToCheck) { | ||
predicate additionalAdditionOrSubtractionCheckForLeapYear(int valueToCheck) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs a change note. |
||
additionalLogicalCheck(this, "+", valueToCheck) or | ||
additionalLogicalCheck(this, "-", valueToCheck) | ||
} | ||
|
||
/** | ||
* DEPRECATED: Use `additionalAdditionOrSubtractionCheckForLeapYear` instead. | ||
*/ | ||
deprecated predicate additionalAdditionOrSubstractionCheckForLeapYear(int valueToCheck) { | ||
this.additionalAdditionOrSubtractionCheckForLeapYear(valueToCheck) | ||
} | ||
|
||
/** | ||
* Holds if this object is used on a modulus 4 operation, which would likely indicate the start of a leap year check. | ||
*/ | ||
|
@@ -180,13 +187,13 @@ class StructTmLeapYearFieldAccess extends LeapYearFieldAccess { | |
this.additionalModulusCheckForLeapYear(100) and | ||
// tm_year represents years since 1900 | ||
( | ||
this.additionalAdditionOrSubstractionCheckForLeapYear(1900) | ||
this.additionalAdditionOrSubtractionCheckForLeapYear(1900) | ||
or | ||
// some systems may use 2000 for 2-digit year conversions | ||
this.additionalAdditionOrSubstractionCheckForLeapYear(2000) | ||
this.additionalAdditionOrSubtractionCheckForLeapYear(2000) | ||
or | ||
// converting from/to Unix epoch | ||
this.additionalAdditionOrSubstractionCheckForLeapYear(1970) | ||
this.additionalAdditionOrSubtractionCheckForLeapYear(1970) | ||
) | ||
} | ||
} | ||
|
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a change note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok