Commit Graph

1647 Commits

Author SHA1 Message Date
Geoffrey White
c7de873a22 Rust: Update the libc models. 2025-07-08 08:44:44 +01:00
Geoffrey White
a1e9a4eddf Rust: Accept test .expected changes. 2025-07-08 08:44:24 +01:00
Tom Hvitved
33e63109bb Merge pull request #19993 from hvitved/rust/type-inference-function-call-expectations
Rust: Add type inference inline expectations for all function calls
2025-07-07 20:40:57 +02:00
Arthur Baars
8114071804 Merge branch 'main' into models1 2025-07-07 19:47:53 +02:00
Arthur Baars
7721d14314 Rust: use getADescendant instead of getAnItem
This should handle all cases where items contained in intermediate nodes, such as MacroCall,
ExternBlock and MacroItem nodes.
2025-07-07 18:04:00 +02:00
Arthur Baars
7556d7b57b Rust: add test with extern block 2025-07-07 18:02:58 +02:00
Tom Hvitved
fad5e0daa8 Rust: Add type inference inline expectations for all function calls 2025-07-07 17:20:15 +02:00
Tom Hvitved
6a9ed88d6e Merge pull request #19975 from hvitved/rust/ssa-phi-in-capture
Rust: Fix SSA inconsistencies
2025-07-07 09:21:57 +02:00
Tom Hvitved
d1dd05e7bb Rust: Fix SSA inconsistencies 2025-07-04 14:43:10 +02:00
Arthur Baars
3d435ddca0 Merge branch 'main' into rust/type-inference-explicit-args 2025-07-04 14:17:52 +02:00
Tom Hvitved
2b2bd17d10 Rust: Add more SSA tests 2025-07-04 10:47:56 +02:00
Geoffrey White
831509539b Merge pull request #19934 from geoffw0/models0
Rust: Update legacy MaD models 1
2025-07-03 14:24:21 +01:00
Tom Hvitved
2924faf7f8 Rust: Tweak illFormedTypeMention consistency check 2025-07-03 11:56:16 +02:00
Paolo Tranquilli
c10d89927d Merge pull request #19945 from github/redsun82/fix-expansion-in-lib
Rust: fix macro expansion in library code
2025-07-02 18:11:36 +02:00
Paolo Tranquilli
c70198e4e4 Rust: change dummy macro call expansion 2025-07-02 12:25:10 +02:00
Tom Hvitved
f7195f04f8 Rust: Handle more explicit type arguments in type inference 2025-07-02 11:37:05 +02:00
Tom Hvitved
b6d5225bf5 Rust: Add more type inference tests 2025-07-02 11:37:03 +02:00
Paolo Tranquilli
63ccbec933 Rust: accept language test changes 2025-07-02 10:19:52 +02:00
Geoffrey White
3e11dbded0 Rust: Accept test changes. 2025-07-02 09:08:15 +01:00
Paolo Tranquilli
223f0c8684 Rust: fix macro expansion in library code
There was a mismatch between a `self.macro_context_level += 1` and the
corresponding `self.macro_context_level -= 1`, which resulted in an
`usize` underflow (panic in debug mode, wrong behaviour in release
mode).

This fixes it and adds a relevant assertion and test. In order to
properly test library mode extraction, a special option enforcing that
on source code as well is added.
2025-07-01 17:31:26 +02:00
Tom Hvitved
add2e0fd9d Rust: Extend methodResolutionDependsOnArgument to parameterized implementations 2025-07-01 14:22:06 +02:00
Tom Hvitved
961e6201ea Rust: Add more type inference tests 2025-07-01 14:22:04 +02:00
Tom Hvitved
b813010b75 Merge pull request #19903 from hvitved/rust/type-inference-overlap2
Rust: Apply inherent method prioritization inside type inference loop
2025-07-01 14:21:15 +02:00
Tom Hvitved
072339137a Rust: Update expected test output 2025-07-01 10:34:16 +02:00
Tom Hvitved
bd1f46b75c Rust: Assume prelude is always available in path resolution 2025-07-01 10:18:02 +02:00
Tom Hvitved
e88d7baa7d Rust: Apply inherent method prioritization inside type inference loop 2025-07-01 10:17:26 +02:00
Tom Hvitved
e5f0ef6ae8 Rust: Add more type inference tests 2025-07-01 10:17:25 +02:00
Geoffrey White
59b74871c2 Rust: Accept regressions. 2025-06-30 21:13:44 +01:00
Geoffrey White
91072477b7 Rust: Trivial test changes. 2025-06-30 20:15:18 +01:00
Paolo Tranquilli
15aa0bbb34 Merge pull request #19866 from github/redsun82/codegen-new-parent-child
Codegen: improve implementation of generated parent/child relationship
2025-06-30 14:52:24 +02:00
Tom Hvitved
57661df306 Rust: Fix variable capture inconsistencies 2025-06-30 10:19:42 +02:00
Paolo Tranquilli
9cf037fdb9 Merge branch 'main' into redsun82/codegen-new-parent-child 2025-06-30 10:17:56 +02:00
Tom Hvitved
632cde689b Merge pull request #19702 from geoffw0/lifetime
Rust: New query rust/access-after-lifetime-ended
2025-06-30 10:00:11 +02:00
Tom Hvitved
db0fc7be5d Merge pull request #19881 from hvitved/rust/dataflow-traits
Rust: Data flow through trait methods
2025-06-27 08:55:48 +02:00
Paolo Tranquilli
de72e68d2c Merge branch 'main' into redsun82/codegen-new-parent-child 2025-06-26 12:14:53 +02:00
Paolo Tranquilli
9a8ef3acf7 Merge branch 'main' into redsun82/codegen-new-parent-child 2025-06-26 09:30:41 +02:00
Tom Hvitved
8c240399c1 Rust: Apply MaD trait models to implementations 2025-06-25 21:32:24 +02:00
Tom Hvitved
3e54c61f52 Rust: Add MaD trait tests 2025-06-25 21:32:22 +02:00
Tom Hvitved
5e265b10c7 Rust: Trait call dispatch in dataflow 2025-06-25 21:32:21 +02:00
Tom Hvitved
a4ed5da50b Rust: Add data flow tests involving traits 2025-06-25 21:32:19 +02:00
Geoffrey White
006f0e8fcf Merge branch 'main' into lifetime 2025-06-25 14:17:00 +01:00
Paolo Tranquilli
6a0140d3c9 Rust: fix Const test 2025-06-25 14:42:03 +02:00
Paolo Tranquilli
ab2e7082f3 Merge branch 'main' into redsun82/codegen-use-one-test-file 2025-06-25 14:31:17 +02:00
Paolo Tranquilli
fa006e3ea5 Rust: fix test 2025-06-25 14:17:14 +02:00
Paolo Tranquilli
1f66f902e5 Rust: fix parallel execution of tests using the nightly toolchain
Since we dropped checked in toolchain files for tests requiring nightly,
the `setup.sh` script was not doing its job of setting up the toolchains
and the `rust-src` component, occasionally leading to test failures.
2025-06-25 14:13:43 +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
Geoffrey White
21bea7e403 Merge branch 'main' into typeinfer 2025-06-24 11:23:34 +01:00
Geoffrey White
6677a81e1c Merge branch 'main' into lifetime 2025-06-24 10:11:21 +01:00