C++: add Declaration.hasGlobalOrStdName()#1585
Merged
Merged
Conversation
Contributor
|
Changes LGTM. Do you have any idea whether this is likely to create significant new results for any queries / projects? |
54e2330 to
77db30b
Compare
Contributor
Author
|
Rebased over the autoformat patches and moved changenote to 1.23 |
hubwriter
previously approved these changes
Sep 16, 2019
semmledocs-ac
previously approved these changes
Sep 16, 2019
jbj
reviewed
Sep 17, 2019
|
|
||
| predicate bufferAndSizeFunction(Function f, int buf, int size) { | ||
| f.hasGlobalOrStdName("read") and buf = 1 and size = 2 | ||
| f.hasStdName("read") and buf = 1 and size = 2 |
Contributor
There was a problem hiding this comment.
What does the hasStdName() predicate do exactly? I ask because I don't believe that read (and other unbuffered I/O routines) get pulled into namespace std.
Contributor
Author
There was a problem hiding this comment.
I did that backwards - fixed after the rebase
e5cbf3c to
4018ed6
Compare
Contributor
|
I've resolved all my comments that you've addressed. Two are left. |
6a19497 to
5c084f8
Compare
jbj
reviewed
Oct 9, 2019
jbj
left a comment
Contributor
There was a problem hiding this comment.
[ERROR] Input file ql/cpp/ql/src/Critical/OverflowCalculated.ql is not correctly formatted
Otherwise LGTM.
jbj
added a commit
to jbj/ql
that referenced
this pull request
Nov 20, 2019
This predicate was removed before github#1585 was merged, but we forgot to remove it from the change note.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds
Declaration.hasGlobalOrStdNameandDeclaration.hasStdName, and converts uses ofhasGlobalNamethat refer to C standard library functions that are in thestdnamespace in C++ to usehasGlobalOrStdNameinstead.