Commit Graph

1086 Commits

Author SHA1 Message Date
Simon Friis Vindum
cab916453d Rust: Update unused value expected test result 2024-10-28 12:18:00 +01:00
Simon Friis Vindum
c5b01eb629 Merge branch 'main' into rust-saa-additions 2024-10-28 11:42:32 +01:00
Geoffrey White
e5818f6f2e Rust: Fix unused value cases in the unreachable test (they're not interesting, just distract from the point of these tests. 2024-10-28 10:29:31 +00:00
Arthur Baars
fdf99e2f50 Rust: filter out definitions that are inside expanded macros 2024-10-28 11:27:59 +01:00
Geoffrey White
72606d5a59 Rust: Add missing annotations to unreachable test. 2024-10-28 10:22:46 +00:00
Arthur Baars
c4126e4410 Rust: add tests for Definitions.qll 2024-10-28 11:17:48 +01:00
Paolo Tranquilli
719b5e175f Rust: add missing expected files 2024-10-25 17:06:54 +02:00
Paolo Tranquilli
8f6196d5f1 Rust: accept test changes 2024-10-25 16:58:05 +02:00
Paolo Tranquilli
9789059e9f Rust: add more thourough canonical path testing 2024-10-25 16:58:05 +02:00
Paolo Tranquilli
34b1055c13 Rust: accept test changes 2024-10-25 16:58:04 +02:00
Paolo Tranquilli
194e0daa8c Rust: add canonical_path and crate_origin to Item 2024-10-25 16:58:04 +02:00
Simon Friis Vindum
f7a45e6650 Rust: Don't consider parameters in trait method definitions without bodies as variables 2024-10-25 15:56:58 +02:00
Simon Friis Vindum
a5ce3c1570 Rust: Move trait tests for unused entities into main.rs 2024-10-25 15:15:49 +02:00
Arthur Baars
9dc5e2fa36 Merge pull request #17791 from github/aibaars/rust-format-templates
Rust: parse formatting templates
2024-10-25 12:42:35 +02:00
Simon Friis Vindum
334602a50a Rust: Handle calls that might read/write variables through closures
This implementation is copied and adapted from the Ruby SSA
implementation.
2024-10-25 10:50:32 +02:00
Simon Friis Vindum
75103f4b26 Merge branch 'main' into rust-saa-additions 2024-10-25 10:43:59 +02:00
Paolo Tranquilli
41d0085918 Rust: address review 2024-10-24 17:54:18 +02:00
Paolo Tranquilli
c79f8180f3 Rust: move down options in query-tests 2024-10-24 17:14:48 +02:00
Arthur Baars
be41ca5d4e Rust: update expected output 2024-10-24 15:13:19 +02:00
Arthur Baars
8f2c7c1239 Rust: parse formatting templates 2024-10-24 15:10:59 +02:00
Paolo Tranquilli
3f8d438851 Rust: move qltest to rust code, add options with cargo check 2024-10-24 12:55:23 +02:00
Simon Friis Vindum
85e59c9920 Merge branch 'main' into rust-saa-additions 2024-10-21 13:30:02 +02:00
Simon Friis Vindum
a1ebf98552 Merge branch 'main' into rust-cfg-fixes 2024-10-21 10:12:07 +02:00
Simon Friis Vindum
3ae04752c4 Rust: Accept less CFG inconsistencies 2024-10-21 10:07:11 +02:00
Simon Friis Vindum
9c172f62a4 Rust: Fix dead end in CFG for match expressions with no arms 2024-10-21 09:59:23 +02:00
Simon Friis Vindum
381f061e7f Rust: Add CFG test for match with no arms 2024-10-21 09:29:28 +02:00
Simon Friis Vindum
4ddc7a4592 Rust: Update unused value expected results 2024-10-18 15:49:52 +02:00
Simon Friis Vindum
b665f45ffa Merge branch 'main' into unreachable2 2024-10-18 15:13:40 +02:00
Simon Friis Vindum
28f111b7c0 Rust: Remove erroneous CFG edge from return to break 2024-10-18 13:26:11 +02:00
Simon Friis Vindum
4ca6b0eceb Rust: Add a CFG test for a return within a break 2024-10-18 13:22:39 +02:00
Simon Friis Vindum
7aa28a0449 Rust: Fix multiple CFG successors in range pattern without lower bound 2024-10-18 11:19:21 +02:00
Simon Friis Vindum
b0625f83c6 Rust: Add CFG test of range patterns 2024-10-18 11:19:19 +02:00
Simon Friis Vindum
272d12fee1 Rust: Step correctly over method arguments
Previously the math was wrong and the first argument (with `i` being `0`) had two edges out of it.
2024-10-18 11:19:07 +02:00
Arthur Baars
6e197b5802 Merge pull request #17773 from geoffw0/unusedval2
Rust: Implement UnusedValue.ql (2)
2024-10-17 21:03:24 +02:00
Geoffrey White
e1aaa136b2 Rust: Add variants with pattern matching for unreachable_let_1 and 2. 2024-10-17 15:38:47 +01:00
Geoffrey White
3d0c86e176 Rust: Test spacing. 2024-10-17 15:37:03 +01:00
Simon Friis Vindum
b2032fc6fd Rust: Only normal completion of a let statement initializer steps to the pattern 2024-10-17 16:28:57 +02:00
Simon Friis Vindum
e6f1edcbb5 Rust: Conditional completion of match arm expression should now flow to next arm 2024-10-17 16:25:19 +02:00
Simon Friis Vindum
04f2062942 Rust: Label the non-return CFG edge out of question mark as match 2024-10-17 16:22:07 +02:00
Simon Friis Vindum
fd5d6255c1 Rust: Avoid creating CFG scopes for trait signatures without implementations 2024-10-17 16:20:30 +02:00
Simon Friis Vindum
b0cd44e47f Rust: Add CFG test cases 2024-10-17 16:09:17 +02:00
Simon Friis Vindum
2d1c62b6df Rust: Fix dead end in CFG for empty tuple and struct patterns 2024-10-17 10:40:34 +02:00
Simon Friis Vindum
b97ec405d0 Rust: Add CFG tests with empty tuple and struct patterns 2024-10-17 10:34:49 +02:00
Geoffrey White
e21959d7bb Rust: Add more unreachable test cases. 2024-10-16 17:34:57 +01:00
Geoffrey White
a92de0df93 Rust: Test spacing. 2024-10-16 16:56:12 +01:00
Geoffrey White
7e2542bd74 Rust: Accept consistency check failures. 2024-10-16 14:32:16 +01:00
Geoffrey White
7d62cdad71 Merge pull request #17774 from geoffw0/astcount
Rust: Count number of AST inconsistencies
2024-10-16 14:17:39 +01:00
Simon Friis Vindum
76e1885355 Rust: Make mutable variables that are only borrowed immutably amenable for SSA 2024-10-16 15:07:46 +02:00
Simon Friis Vindum
577afc3fd5 Rust: Support capture of mutable variables in SSA 2024-10-16 14:57:46 +02:00
Simon Friis Vindum
a1db359ba1 Rust: Add variable tests involving borrowing and capture 2024-10-16 13:05:53 +02:00