-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix DFG of the variable of a
ForEachStatement
(#1052)
* Set initializer for variable in a foreach statement * Less hacky approach * Handle foreach declaration in normal DFGPass * Update documentation * Do not handle all DeclarationStatements but only the ones in the ForEachLoop variable * Add testcase for DFG edges * Fix DFG ForEachStatement and add Python test * fix for loop and add DFG test * fix test * fix test * DFG pass fixes ForEach with Declarations @KuechA * New crazy idea * Moving some code around * Also handle NamespaceDeclarations for the DFG * Move test code to function * Compiler error * Fix loop DFGs * Correct parsing of functions in namespaces in C++ (#1078) * We incorrectly assumed that all scoped function definitions are methods. This is not true. This PR fixes this issue by determinging the correct scope target (which could also be a namespace). Furthermore, this tries to mitigate the problem that types used within such a function could refer to a namespaced entity but are referred with its local name. Since this requires resolving of symbols in a frontend, we introduce a new annotaiton `@ResolveInFrontend` to warn developers. Fixes #1070 * Converting remaining Java node classes to Kotlin (#1082) Co-authored-by: Alexander Kuechler <[email protected]> * Fluent Node DSL (#772) * Fluent Node DSL This PR adds a fluent node DSL to quickly build up a tree of CPG nodes. This can be used for unit tests or any occasion you quickly want to spin up a tree of CPG nodes that are independent of the underlying programming language. This is useful if you want to test the behaviour of some passes purely on the CPG tree, rather than a concrete program. * Consider all children to find the `prevDFG` for `FunctionDeclaration`s (#1086) * Fix DFG for FunctionDeclarations * Remove DFG for unreachable implicit return * Set isImplicit in java frontend * Apply suggestions from code review * Format --------- Co-authored-by: Christian Banse <[email protected]> * Disable problematic test The for loop test is broken because the implementation is broken. Thus, the test is disabled, until there is proper support for multi var assignments. * revert enabling of additional language * make it compile --------- Co-authored-by: Alexander Kuechler <[email protected]> Co-authored-by: Christian Banse <[email protected]> Co-authored-by: KuechA <[email protected]> * Update documentation * Remove all !! operations * Integrate review --------- Co-authored-by: Maximilian Kaul <[email protected]> Co-authored-by: Christian Banse <[email protected]> Co-authored-by: Konrad Weiss <[email protected]>
- Loading branch information
1 parent
5f81ad9
commit dd62756
Showing
7 changed files
with
233 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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.