Commit Graph

41 Commits

Author SHA1 Message Date
Tamas Vajk
3af8273620 Modify extraction of &&/|| to resugar it from when expression 2022-05-10 19:51:30 +01:00
Tamas Vajk
d33224a058 Add test case for missing CFG successor 2022-05-10 19:51:30 +01:00
Tamas Vajk
c6a75957e9 Fix expected files, fix type access extraction of file level static declarations 2022-05-10 19:51:29 +01:00
Ian Lynagh
b35b74779a Revert "Fix CFG construction of ExprStmt and StmtExpr"
This reverts commit db8d718cdbf0bef9cdf246221a921b99d4b22bea.

It broke ql/java/ql/test/library-tests/successors/TestDeclarations
2022-05-10 19:51:28 +01:00
Ian Lynagh
d2f6871868 Revert "Fix ExprStmt and StmtExpr in Boolean context"
This reverts commit 8a42837578e1c4361ed25682312ea5497ad0a12e.
2022-05-10 19:51:28 +01:00
Tamas Vajk
82b937dedd Add query and script to plot CFG from DB 2022-05-10 19:51:28 +01:00
Tamas Vajk
037d66de15 Fix ExprStmt and StmtExpr in Boolean context 2022-05-10 19:51:28 +01:00
Tamas Vajk
8282e57db5 Fix CFG construction of ExprStmt and StmtExpr 2022-05-10 19:51:28 +01:00
Tamas Vajk
81cb81366b Add test case for CFG issue with && in if condition 2022-05-10 19:51:28 +01:00
Tamas Vajk
6ab86a1f46 Fix expected test files after 1.6.20 upgrade 2022-05-10 19:51:27 +01:00
Ian Lynagh
77fec17a36 Kotlin: Autoformat QL 2022-05-10 19:51:25 +01:00
Chris Smowton
9f294d1ecd Adjust more test expectations 2022-05-10 19:51:24 +01:00
Tony Torralba
64531dd717 Fix AST representation of WhenExpr and WhenBranch 2022-05-10 19:51:22 +01:00
Tony Torralba
10ab11cdf7 Handle WhenBranch CFG properly 2022-05-10 19:51:22 +01:00
Chris Smowton
37543e7a86 Switch to expanding property initializers and init blocks in-place
Pros:
* <obinit> no longer emitted: one less function per class
* Parameters to the primary constructor, if any, are no longer referred to out of scope
* Simple primary constructor `val` and `var` declarations work as expected

Cons:
* If there are multiple secondary constructors, no primary constructor and long init blocks, there could be considerable duplicate extraction of those init blocks. Hopefully this case is very rare.
2022-05-10 19:51:20 +01:00
Chris Smowton
8d8a2482f1 Accept test changes
These are just ordering changes because the bounds of assignment statements relative to their operands have changed.
2022-05-10 19:51:20 +01:00
Chris Smowton
dbb7b0bbf0 Update control-flow test expectations 2022-05-10 19:51:19 +01:00
Chris Smowton
8af0f26411 Extract simple in-place operators
Complex in-place operators (someFieldOrArrayCell += e) get a harder-to-parse lowering which needs to be intercepted at the IrBlock level
2022-05-10 19:51:18 +01:00
Chris Smowton
f6db91f294 Update test expectations 2022-05-10 19:51:17 +01:00
Ian Lynagh
579c590ea6 Kotlin: Accept test changes following "casting" operator changes 2022-05-10 19:51:13 +01:00
Tamas Vajk
9d7794185e Fix temporary variable locations 2022-05-10 19:51:11 +01:00
Ian Lynagh
05028e612c Kotlin: Accept test changes 2022-05-10 19:51:11 +01:00
Chris Smowton
70708d69bf Don't extract or call fake-override methods 2022-05-10 19:51:10 +01:00
Tamas Vajk
161463ecae Fix catch clause location 2022-05-10 19:51:08 +01:00
Tamas Vajk
21af31f3ab CFG changes for non-null operator + some tests 2022-05-10 19:51:08 +01:00
Tamas Vajk
a4275865da Fix location of variable access in LHS of assignment 2022-05-10 19:51:07 +01:00
Ian Lynagh
4c8a87bfb1 Kotlin: Accept test changes 2022-05-10 19:51:07 +01:00
Ian Lynagh
1c5f6d70bc Kotlin: Accept changes 2022-05-10 19:51:07 +01:00
Ian Lynagh
46f103c243 Kotlin: Accept test changes 2022-05-10 19:51:06 +01:00
Ian Lynagh
be5e478718 Kotlin: Accept test change 2022-05-10 19:51:04 +01:00
Ian Lynagh
f726e6acf8 Kotlin: Fix handling of objects in external dependencies 2022-05-10 19:51:01 +01:00
Ian Lynagh
9996d77701 Kotlin: Reinstate disabled test now bug is fixed 2022-05-10 19:50:59 +01:00
Ian Lynagh
5bb9357dbe Kotlin: Disable part of a test that gives us DB check inconsistencies 2022-05-10 19:50:59 +01:00
Ian Lynagh
49d2e86b5e Kotlin: Accept test changes 2022-05-10 19:50:59 +01:00
Ian Lynagh
6fd8d638a3 Kotlin: Accept test output 2022-05-10 19:50:59 +01:00
Ian Lynagh
62b3e07ae6 Kotlin: Accept test changes 2022-05-10 19:50:58 +01:00
Ian Lynagh
b9d6712371 Kotlin: Update test output 2022-05-10 19:50:58 +01:00
Ian Lynagh
d05643fa88 Kotlin: Add library-tests/controlflow/paths test (copied from Java) 2022-05-10 19:50:58 +01:00
Ian Lynagh
e755cc92b6 Kotlin: Add controlflow/dominance test (copied from Java) 2022-05-10 19:50:58 +01:00
Ian Lynagh
aebd8edf85 Kotlin: Make library-tests/controlflow/basic quieter 2022-05-10 19:50:58 +01:00
Ian Lynagh
d0bf462a45 Kotlin: Add a copy of Java's controlflow/basic test 2022-05-10 19:50:58 +01:00