Commit Graph

1765 Commits

Author SHA1 Message Date
Arthur Baars
4a5a48a5b6 Rust: move PrintCfg to ide-contextual-queries 2024-10-18 16:11:18 +02:00
Arthur Baars
c9372b91f8 Rust: move ide-contextual-queries to the library pack 2024-10-18 16:11:17 +02:00
Arthur Baars
53744407ad Rust: add localDefinitions.ql 2024-10-18 16:11:08 +02:00
Simon Friis Vindum
b1e85d1ad8 Rust: Refactor BreakExprTree to use StandardPostOrderTree 2024-10-18 13:30:36 +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
6568eb80a2 Rust: Refactor CFG pattern tree implementation 2024-10-18 12:52:56 +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
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
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
2d1c62b6df Rust: Fix dead end in CFG for empty tuple and struct patterns 2024-10-17 10:40:34 +02: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
Geoffrey White
f9eca42ded Merge pull request #17763 from geoffw0/cfgcount3
Rust: Count number of CFG inconsistencies
2024-10-15 15:43:39 +01:00
Geoffrey White
e01ecd1b79 Rust: Calculate a total of AST inconsistencies. 2024-10-15 14:19:42 +01:00
Geoffrey White
2d019eb00e Rust: Add QLDoc to the AST consistency rules and make their output more consistent. 2024-10-15 14:19:40 +01:00
Geoffrey White
414fcf836e Rust: Move the AST consistency logic to a .qll. 2024-10-15 14:19:38 +01:00
Geoffrey White
79c5adfc9a Rust: Use correct versions of the consistency predicates. 2024-10-15 14:10:51 +01:00
Paolo Tranquilli
248eb7f00c Merge branch 'main' into rust/callable-base 2024-10-15 11:03:11 +02:00
Arthur Baars
508e8157b3 Merge pull request #17746 from github/aibaars/macro-pat-irrefutable
Rust: add MacroPat to isExhaustiveMatch
2024-10-15 10:45:06 +02:00
Simon Friis Vindum
cc1e33fb64 Merge pull request #17713 from hvitved/rust/ssa
Rust: Initial SSA implementation
2024-10-15 09:59:48 +02:00
Arthur Baars
ae7afa7aff Update rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll
Co-authored-by: Simon Friis Vindum <simonfv@gmail.com>
2024-10-14 15:20:43 +02:00
Arthur Baars
493a68a232 Rust: add MacroPat to isExhaustiveMatch 2024-10-14 13:55:59 +02:00
Simon Friis Vindum
22261c1480 Rust: Rename isIrrefutablePattern to isExhaustiveMatch 2024-10-14 13:43:57 +02:00
Simon Friis Vindum
e83f1d17bf Rust: Simplify return implementation in CFG 2024-10-14 11:40:35 +02:00
Simon Friis Vindum
8e4e663739 Rust: Handle question mark operator in CFG 2024-10-14 11:38:35 +02:00
Simon Friis Vindum
2f07f1c730 Rust: Abnormal completion in scrutinee does not continue to match arms 2024-10-14 11:32:22 +02:00
Tom Hvitved
6290be2922 Rust: Initial SSA implementation 2024-10-11 19:39:28 +02:00
Geoffrey White
7b712f3d65 Rust: Calculate a total of CFG inconsistencies. 2024-10-11 17:01:41 +01:00
Geoffrey White
4398c83a67 Rust: Add more QLDoc to the CFG consistency library. 2024-10-11 16:53:46 +01:00
Geoffrey White
85f2582afd Rust: Move CFG consistency logic into a library. 2024-10-11 16:53:45 +01:00
Arthur Baars
fc298b23c9 Rust: address comment 2024-10-11 16:01:13 +02:00
Arthur Baars
5f45402cf7 Merge remote-tracking branch 'upstream/main' into aibaars/rust-macros 2024-10-11 15:40:07 +02:00
Tom Hvitved
ac8b9739c5 Merge pull request #17686 from hvitved/rust/cfg-patterns
Rust: Include parameters and patterns in the CFG
2024-10-11 14:45:27 +02:00
Tom Hvitved
ffd6b9864c Address review comments 2024-10-11 14:27:42 +02:00
Arthur Baars
659ce6f1ca Rust: fix CodeQL alert 2024-10-11 13:45:10 +02:00
Arthur Baars
b4bb24aa43 Merge remote-tracking branch 'upstream/main' into aibaars/rust-macros 2024-10-11 13:33:50 +02:00
Tom Hvitved
8cc349e85f Rust: Run codegen 2024-10-11 12:01:16 +02:00
Paolo Tranquilli
f3bf347bd6 Merge branch 'main' into redsun82/codegen-annotate 2024-10-11 10:38:02 +02:00
Arthur Baars
9fad5410c0 Rust: implement CFG for macros 2024-10-11 10:37:24 +02:00
Paolo Tranquilli
c66bd72620 Rust: rename to CallExprBase 2024-10-11 09:52:30 +02:00
Tom Hvitved
756affa4aa Rust: Fix bugs in LetExprTree and MethodCallExprTree 2024-10-10 21:05:01 +02:00
Tom Hvitved
2f14ec9f2a Rust: Include patterns in the CFG 2024-10-10 21:05:00 +02:00
Tom Hvitved
f6f54c6e3b Rust: Include parameters in the CFG 2024-10-10 21:04:58 +02:00
Tom Hvitved
5f353b72cd Merge pull request #17727 from github/aibaars/modifiers
Rust: add extraction of all sorts of modifier tokens
2024-10-10 18:00:21 +02:00
Simon Friis Vindum
1398575b97 Merge pull request #17728 from paldepind/rust-remove-unused-types
Rust: Remove unused types
2024-10-10 17:33:59 +02:00
Geoffrey White
04c7319b6b Merge pull request #17647 from geoffw0/warnings
Rust: More information about extractor errors and warnings
2024-10-10 16:19:15 +01:00