-
Notifications
You must be signed in to change notification settings - Fork 371
[swiftsrc2cpg] Call and type decl member/access rework #5692
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
Conversation
- no more local from assignment to type decl member - assignment to type decl member is now correctly attached to the constructor block - no member from method/function under type decl - proper call base - implicit self access to member from identifier
...ontends/swiftsrc2cpg/src/main/scala/io/joern/swiftsrc2cpg/astcreation/AstCreatorHelper.scala
Outdated
Show resolved
Hide resolved
...frontends/swiftsrc2cpg/src/main/scala/io/joern/swiftsrc2cpg/astcreation/AstNodeBuilder.scala
Outdated
Show resolved
Hide resolved
...n-cli/frontends/swiftsrc2cpg/src/test/scala/io/joern/swiftsrc2cpg/passes/ast/CallTests.scala
Outdated
Show resolved
Hide resolved
...ontends/swiftsrc2cpg/src/main/scala/io/joern/swiftsrc2cpg/astcreation/AstCreatorHelper.scala
Outdated
Show resolved
Hide resolved
...swiftsrc2cpg/src/test/scala/io/joern/swiftsrc2cpg/passes/ast/SimpleAstCreationPassTest.scala
Show resolved
Hide resolved
b85667d to
21474f1
Compare
21474f1 to
ac30297
Compare
...ontends/swiftsrc2cpg/src/main/scala/io/joern/swiftsrc2cpg/astcreation/AstCreatorHelper.scala
Outdated
Show resolved
Hide resolved
…src2cpg/astcreation/AstCreatorHelper.scala Co-authored-by: maltek <[email protected]>
fix broken attribute diffgraph add
abbb7ca to
d99b019
Compare
…thods - simple call to static function detection - self param for synthetic constructor methods
9c513f5 to
87a8f34
Compare
...n-cli/frontends/swiftsrc2cpg/src/test/scala/io/joern/swiftsrc2cpg/passes/ast/CallTests.scala
Show resolved
Hide resolved
...n-cli/frontends/swiftsrc2cpg/src/test/scala/io/joern/swiftsrc2cpg/passes/ast/CallTests.scala
Outdated
Show resolved
Hide resolved
ml86
left a comment
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.
I did not see a test for a call to an extension method and also calls on protocols. If the are missing please add them.
...n-cli/frontends/swiftsrc2cpg/src/test/scala/io/joern/swiftsrc2cpg/passes/ast/CallTests.scala
Show resolved
Hide resolved
ml86
left a comment
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.
Please also add a test where one class implements two protocols.
...n-cli/frontends/swiftsrc2cpg/src/test/scala/io/joern/swiftsrc2cpg/passes/ast/CallTests.scala
Outdated
Show resolved
Hide resolved
|
@maltek We lose https://github.com/ShiftLeftSecurity/codescience/blob/04601283b4c56be30aec56f735e46adc2022152b/sptestV2/expectations/swiftsrc2cpg-DVIA-v2/DVIA-v2.cpg.sptest.json#L7 with this PR, the other findings are all fine. |
This PR includes the following changes:
There is no way to determine whether a call is a call to a static method/function at the moment. The SwiftParser does not provide that information. I will extend the utils handling compiler information for this purpose. This would go beyond the scope of this PR (its already large enough). Will do a follow up PR.