Commit Graph

86 Commits

Author SHA1 Message Date
Paolo Tranquilli
de72e68d2c Merge branch 'main' into redsun82/codegen-new-parent-child 2025-06-26 12:14:53 +02:00
Paolo Tranquilli
355fd85c23 Codegen: remove unneeded has|getNumberOf in instance tests 2025-06-25 12:02:13 +02:00
Paolo Tranquilli
6bbf1e3bc1 Codegen: use one generated test file per directory
This collapses all generated test QL sources into a single one per
directory, using query predicates to run the different tests.

This should improve the time required to run generated tests.
2025-06-25 11:44:54 +02:00
Paolo Tranquilli
1dcd60527c Codegen: improve implementation of generated parent/child relationship
This improves the implementation of the generated parent/child
relationship by adding a new `all_children` field to `ql.Class` which
lists all children (both direct and inherited) of a class, carefully
avoiding duplicating children in case of diamond inheritance. This:
* simplifies the generated code,
* avoid children ambiguities in case of diamond inheritance.

This only comes with some changes in the order of children in the
generated tests (we were previously sorting bases alphabetically there).
For the rest this should be a non-functional change.
2025-06-24 17:26:24 +02:00
Jeroen Ketema
10d86c9708 Swift: Disable parts of tests that crash with Swift 6.1 2025-04-23 17:10:56 +02:00
Jeroen Ketema
b6076c0481 Swift: Update test results for ParenType no longer being extracted 2025-04-23 17:10:55 +02:00
Jeroen Ketema
1b21e4c667 Swift: Update test results for IfConfigDecl no longer being extracted 2025-04-23 17:10:55 +02:00
Paolo Tranquilli
1f356078ff Swift: temporarily accept test changes 2024-10-31 15:57:31 +01:00
Tom Hvitved
4ab5a1a060 Swift: Run code generator 2024-09-16 13:40:02 +02:00
Alex Denisov
dde2ad1290 Swift: do not print MacroRole as part of AST 2023-11-21 14:49:55 +01:00
Alex Denisov
8b126fe51a Swift: extract MacroDecl 2023-11-15 14:07:45 +01:00
Alex Denisov
bbde709b3f Swift: upgrade to 5.9.1 2023-11-07 13:40:28 +01:00
Paolo Tranquilli
7bae2d9192 Swift: fix tests 2023-10-31 10:44:41 +01:00
Paolo Tranquilli
9196939384 Swift: canonicalize all VarDecls 2023-10-25 10:38:17 +02:00
Paolo Tranquilli
f22d60f011 Swift: clean up VarDecl, NamedPattern and SwitchStmt interactions
* `variables` under `CaseStmt` are now AST children, which solves
  orphan `VarDecl`s in that case
* reordered `CaseStmt` AST children to be `labels > variables > body`
  (was `body > labels`)
* made `NamedPattern::getVarDecl` an extracted property instead of
  `getName`
* The above led to duplicate DB entities because of a quirk in the
  Swift compiler code. This is solved by tweaking the extraction of
  `variables` under `CaseStmt` to not use `getCaseBodyVariables`.
2023-10-23 17:36:42 +02:00
Paolo Tranquilli
7cc20587ad Codegen: add @qltest.test_with
This allows to group together related AST classes to reuse the same
test source and extraction. For example this is useful for
`EnumDecl/EnumCaseDecl/EnumElementDecl`, where this is applied to.
2023-10-23 14:51:22 +02:00
Alex Denisov
4133284bc8 Swift: skip declarations marked as unavailable 2023-10-11 10:55:49 +02:00
Robert Marsh
ae1072e09f Merge branch 'main' into rdmarsh2/swift/for-in 2023-09-26 15:12:46 +00:00
Paolo Tranquilli
270c6407f0 Swift: accept test changes 2023-09-14 10:18:41 +02:00
Paolo Tranquilli
4d3aecfff6 Swift: rename base_types to syntactic_base_types in TypeDecl 2023-09-14 10:03:52 +02:00
Alex Denisov
b657301d39 Swift: update test expectations 2023-08-22 18:03:19 +02:00
Robert Marsh
22ae430e65 Swift: accept more test changes from hiding InOutExpr 2023-07-28 20:43:25 +00:00
Alex Denisov
ea5eda0f22 Swift: adjust test expectations 2023-06-27 17:21:56 +02:00
Alex Denisov
0479ef5b9c Merge remote-tracking branch 'origin/rc/3.10' into alexdenisov/rc3.10_mergeback 2023-06-16 10:13:23 +02:00
Paolo Tranquilli
17111c96e4 Swift: accept test expectation changes 2023-06-14 16:17:44 +02:00
Nora Dimitrijević
8ccbad601b Swift: PrintAst test changes 2023-06-06 16:54:47 +02:00
Paolo Tranquilli
b26b0a6e43 Swift: remove property wrapper CFG inconsistencies 2023-05-25 13:05:21 +02:00
Paolo Tranquilli
7878bc3cc1 Swift: remove property wrapper AST inconsistencies 2023-05-25 12:15:22 +02:00
Paolo Tranquilli
63fb0581c2 Swift: accept inconsistencies for now 2023-05-24 20:09:46 +02:00
Paolo Tranquilli
de03bdc235 Swift: fix hidden AST getters
For consistency with the C/C++ QL library, getters of AST elements
within the hidden AST should not themselves skip other hidden AST
elements.
2023-05-22 09:57:48 +02:00
Nora Dimitrijević
91a151ec2a Swift: update tests 2023-04-26 15:47:20 +02:00
Nora Dimitrijević
1f861fda25 Merge pull request #12736 from d10c/swift/capture-flow
Swift: Closure Capture Helper APIs
2023-04-20 18:45:56 +02:00
Geoffrey White
49dccaa89d Swift: Fix other tests. 2023-04-19 14:16:24 +01:00
Nora Dimitrijević
7f675d8c3b Swift: more CapturedDecl test cases 2023-04-18 16:50:38 +02:00
Paolo Tranquilli
20128adee4 Swift: make imported and exported modules a set 2023-03-29 15:44:07 +02:00
Paolo Tranquilli
aaea976cf2 Swift: remove labels from function type printing 2023-03-20 16:43:34 +01:00
Paolo Tranquilli
feb4e60c4b Swift: make all ql generation language agnostic 2023-02-27 09:46:48 +01:00
Nora Dimitrijević
50e5b29eb7 Swift: all Callables can have captures [codegen'd] 2023-02-02 11:56:51 +01:00
Nora Dimitrijević
ce2e7f1d12 Swift: all Callables can have captures [hand-written] 2023-02-02 11:35:50 +01:00
Nora Dimitrijević
d230431006 Swift: extract closure captures (codegen'd part) 2023-02-02 11:35:49 +01:00
Nora Dimitrijević
87f7bc3a63 Swift: introduce closure capture AST test 2023-02-02 11:30:33 +01:00
Nora Dimitrijević
9346f4d760 Swift: fix failing tests 2023-01-30 11:39:06 +01:00
Nora Dimitrijević
1396d07662 Swift: subsume IterableDeclContext into Decl [tests] 2023-01-28 00:44:49 +01:00
Nora Dimitrijević
9a5614e8c5 Swift: subsume IterableDeclContext into Decl [codegen'd] 2023-01-28 00:44:49 +01:00
Paolo Tranquilli
0d32f00020 Swift: update ExtensionDecl test results 2023-01-17 12:58:02 +01:00
Paolo Tranquilli
f6e26211f9 Swift: add protocols to ExtensionDecl schema 2023-01-17 12:54:50 +01:00
Paolo Tranquilli
8906e101cb Swift: add ExtensionDecl QL test 2023-01-17 12:49:53 +01:00
Nora Dimitrijević
95d4c304da Swift: Fix .expected tests
Only UnsafeJsEval remains.
2022-12-14 15:02:15 -05:00
Nora Dimitrijević
6269e6b24d Swift: move getName to Callable (generated)
Now that getStaticTarget returns a Callable.
2022-12-14 14:30:33 -05:00
Nora Dimitrijević
f6d5e8db5f Swift: update test .expected files 2022-12-14 14:27:59 -05:00