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
Geoffrey White
4577d1ce06
Rust: Additional test cases.
2024-10-16 11:38:30 +01:00
Geoffrey White
5b667026cb
Rust: More fixup after some line numbers changed.
2024-10-15 16:17:03 +01:00
Paolo Tranquilli
886c7f1f7a
Merge pull request #17771 from github/redsun82/rust-codegen
...
Rust: fix codegen to allow `--force` again
2024-10-15 17:08:39 +02:00
Paolo Tranquilli
2c970a080d
Rust: remove useless blank line
...
Co-authored-by: Simon Friis Vindum <simonfv@gmail.com >
2024-10-15 16:50:15 +02:00
Geoffrey White
feed0ebeca
Rust: Autoformat.
2024-10-15 15:49:56 +01: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
2a68d3e46e
Rust: Put Yes, No back in the logical order.
2024-10-15 15:31:34 +01:00
Geoffrey White
84a74d910d
Rust: Fixup after merging main.
2024-10-15 15:24:43 +01:00
Tom Hvitved
88f6d3b5ea
Rust: Implement UnusedValue.ql
2024-10-15 15:05:39 +01:00
Geoffrey White
f07f6188ae
Rust: Make rust/summary/summary-statistics a metric query so that we can access data in the DCA job.
2024-10-15 14:19:46 +01:00
Geoffrey White
f4d4925239
Rust: Address QL-for-QL complaint.
2024-10-15 14:19:45 +01:00
Geoffrey White
2be5ce4f7a
Rust: Change rust/summary/summary-statistics to a diagnostic query, so that it gets run as a diagnmetric query for DCA.
2024-10-15 14:19:44 +01:00
Geoffrey White
e8953fb5e4
Rust: Add diagnostic query for AST inconsistency counts.
2024-10-15 14:19:43 +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
b5c88c7bfe
Rust: Give the extraction consistency query metadata as well.
2024-10-15 14:19:39 +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
1d9767a163
Merge pull request #17770 from github/redsun82/rust-callable-base
...
Rust: Add `Callable` as a base class of `Function` and `ClosureExpr`
2024-10-15 15:00:59 +02:00
Paolo Tranquilli
8e31abaefe
Rust: fix codegen to allow --force
...
This passes command line arguments to codegen, allowing in particular
`--force` to be passed.
Also, a convenience `//rust/codegen:py` is added to only run the python
based code generation, which will be faster and enough when
`ast-generator` is unchanged.
2024-10-15 14:37:30 +02:00
Paolo Tranquilli
bd08bc7923
Rust: address review
2024-10-15 14:21:11 +02:00
Geoffrey White
abc4981300
Rust: Address QL-for-QL complaint.
2024-10-15 11:30:03 +01:00
Geoffrey White
983179b84e
Rust: Autoformat.
2024-10-15 11:23:16 +01:00
Paolo Tranquilli
248eb7f00c
Merge branch 'main' into rust/callable-base
2024-10-15 11:03:11 +02:00
Geoffrey White
7d9a3e1399
Merge pull request #17756 from geoffw0/unusedvar6
...
Rust: More test cases for rust/unused-variable
2024-10-15 10:02:37 +01: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
Geoffrey White
5e33d9a145
Rust: Further changes from code review.
2024-10-15 09:38:17 +01:00
Geoffrey White
8169ccd21e
Apply suggestions from code review
...
Co-authored-by: Simon Friis Vindum <paldepind@github.com >
2024-10-15 09:36:09 +01: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
Geoffrey White
57875554f4
Rust: Accept consistency failures in the new test cases.
2024-10-14 17:06:55 +01:00
Geoffrey White
e5885f65db
Rust: Add more test cases for unused variables and unreachable code.
2024-10-14 16:25:18 +01:00
Geoffrey White
528641c55a
Rust: Test spacing.
2024-10-14 16:25:17 +01:00
Geoffrey White
134539060d
Rust: correct some 'spurious' annotations that are off by one line.
2024-10-14 16:24:44 +01:00
Geoffrey White
25b592fc89
Merge pull request #17744 from geoffw0/unusedvar5
...
Rust: Unused variable follow-up work
2024-10-14 16:20:52 +01: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
Simon Friis Vindum
23ee7b955c
Rust: Add CFG tests for question mark operator and scrutinee with return
2024-10-14 11:27:32 +02:00
Tom Hvitved
6290be2922
Rust: Initial SSA implementation
2024-10-11 19:39:28 +02:00
Tom Hvitved
b0ea175021
Rust: Add more variables tests
2024-10-11 19:36:04 +02:00
Geoffrey White
c4256f21c7
Rust: Fix out-of-date spurious tags.
2024-10-11 17:18:41 +01:00
Geoffrey White
ac9a8d602c
Rust: Add metadata to the original CFG consistency query.
2024-10-11 17:01:47 +01:00