Geoffrey White
b0514de094
C++: Add cpp/crypto-primitive query to experimental.
2023-11-30 15:03:03 +00:00
Robert Marsh
ba250140a8
Swift: fix an incorrect merge conflict resolution
2023-11-30 14:55:14 +00:00
Mathias Vorreiter Pedersen
3a61dd095c
C++: Add change note.
2023-11-30 14:39:57 +00:00
Felicity Chapman
4cb2f53223
Remove unwanted period from query name
...
Our style guide states that names should not end in a period. I'm updating this now to allow us to automate a process for GitHub docs, see: https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#query-name-name
2023-11-30 14:31:17 +00:00
Mathias Vorreiter Pedersen
c1561e8675
Merge branch 'main' into reduce-duplication-from-operators
2023-11-30 14:30:50 +00:00
Mathias Vorreiter Pedersen
43932b61a8
C++: Add more comments.
2023-11-30 14:20:00 +00:00
Chris Smowton
971ced09ad
Merge pull request #14671 from smowton/smowton/feature/jdk21-switch-pattern-matching
...
Java: Add support for Java 21 language features
2023-11-30 14:11:28 +00:00
Jeroen Ketema
eccc373a2b
Merge pull request #14958 from jketema/dialects
...
Add documentation note on not supporting Objective-C(++), C++/CLI, and C++/CX
2023-11-30 13:03:59 +01:00
Owen Mansel-Chan
d52b23db8e
Improve tests for Incorrect Integer Conversion
...
We changed the test query when the query was changed so that the
comments in the test file would stay the same.
I've reverted the test query and updated the comments in the test file.
This avoids problems in the branch switching to use-use flow.
2023-11-30 11:58:10 +00:00
Owen Mansel-Chan
e958a75223
Add comments indicating whether results are expected at new calls
2023-11-30 11:48:10 +00:00
Chris Smowton
aa8f798853
Move condition into isNonFallThroughPredecessor
2023-11-30 11:24:07 +00:00
Chris Smowton
94819e37c4
More StmtParent -> SwitchBlock
2023-11-30 11:24:07 +00:00
Chris Smowton
e93fe8d614
Update change note
2023-11-30 11:24:07 +00:00
Chris Smowton
53ca8e5fe9
autoformat
2023-11-30 11:24:07 +00:00
Chris Smowton
633b92da62
Introduce and use SwitchBlock instead of StmtParent for switch-statement-or-expression
2023-11-30 11:24:07 +00:00
Chris Smowton
e50a0eee59
Remove duplicate of expr exception propagation logic
2023-11-30 11:24:07 +00:00
Chris Smowton
6f3bff19cc
Expose getFirstPatternCase, not getPatternCase/2
2023-11-30 11:24:07 +00:00
Chris Smowton
40464ed1f9
Eliminate duplicate predicate
2023-11-30 11:24:07 +00:00
Chris Smowton
3971817c92
Fix: ensure is a switch block
2023-11-30 11:24:07 +00:00
Chris Smowton
cc68169f43
Update test expectations re: record-pattern type accesses
2023-11-30 11:24:07 +00:00
Chris Smowton
b1cea1d91e
autoformat
2023-11-30 11:24:07 +00:00
Chris Smowton
561f06a4bd
Remove unused predicate
2023-11-30 11:24:06 +00:00
Chris Smowton
e9603f0aba
Factor out isNonFallThroughPredecessor
2023-11-30 11:24:06 +00:00
Chris Smowton
84ec453a80
Explicitly rule out switchCaseControls for PatternCase
2023-11-30 11:24:06 +00:00
Chris Smowton
77b1721542
Move TypeTestGuard's logic into Guard.appliesTypeTest
2023-11-30 11:24:06 +00:00
Chris Smowton
b33dc38a65
Fix hasBranchEdge for switch exprs with an internal CFG and incoming edges from a passing case guard
2023-11-30 11:24:06 +00:00
Chris Smowton
9b5b496462
Avoid quadratic switch case intermediate
2023-11-30 11:24:06 +00:00
Chris Smowton
d1e16ada4c
Tidy up pattern case CFG logic
2023-11-30 11:24:06 +00:00
Chris Smowton
beb827b1d0
Remove unused predicate
2023-11-30 11:24:06 +00:00
Chris Smowton
1cb5efa1ec
Simplify last nodes of rule cases
2023-11-30 11:24:06 +00:00
Chris Smowton
aa5f7352e2
Remove fall-through CFG edge for exhaustive switch statements
2023-11-30 11:24:06 +00:00
Chris Smowton
1047a89613
Improve complexity class of getASuccessorSwitchCase
2023-11-30 11:24:06 +00:00
Chris Smowton
d99a005b42
Fix pretty-printing case null, default
2023-11-30 11:24:06 +00:00
Chris Smowton
4bff7953fc
Fix record pattern and pretty-printing
2023-11-30 11:24:05 +00:00
Chris Smowton
419d530a06
Add test ensuring read steps via record patterns lead to type filtering
2023-11-30 11:24:05 +00:00
Chris Smowton
087be2cca8
Adjust test expectations
2023-11-30 11:24:05 +00:00
Chris Smowton
a11c5c7257
Fixup pretty-printer and add test
2023-11-30 11:24:05 +00:00
Chris Smowton
3bde66adfb
Pretty-print 'var' statements
2023-11-30 11:24:05 +00:00
Chris Smowton
07d2ce7a41
Change pretty-printing of PatternCase
2023-11-30 11:24:05 +00:00
Chris Smowton
5511955b60
Simplify getCaseIndex
2023-11-30 11:24:05 +00:00
Chris Smowton
bbc0f29f16
Restrict getCheckedType to unrestricted records, introduce getSyntacticCheckedType and use that where appropriate
2023-11-30 11:24:05 +00:00
Chris Smowton
29fdd04eb0
Include switch and instanceof binding in Variable.getAnAssignedValue, and test via endsInQuote
2023-11-30 11:24:05 +00:00
Chris Smowton
ef6ea71e43
Revert unnecessary exists statement
2023-11-30 11:24:05 +00:00
Chris Smowton
47e3d7d8a5
Cast back to Object in advance of returning, to ensure the test doesn't mask a shortcoming of type pruning by pruning at the return site
2023-11-30 11:24:05 +00:00
Chris Smowton
f0144d6a3d
Expose that case guard test controls its case body
2023-11-30 11:24:04 +00:00
Chris Smowton
da62a04653
Note that binding variables may be casting nodes
2023-11-30 11:24:04 +00:00
Chris Smowton
c11a260369
Note we can't prove certain unreachable callables when 'case null' is present
2023-11-30 11:24:04 +00:00
Chris Smowton
89f7e7f76a
autoformat
2023-11-30 11:24:04 +00:00
Chris Smowton
dd41f50fbf
Fix uses of ConditionBlock that require a condition expression (not a switch case statement)
2023-11-30 11:24:04 +00:00
Chris Smowton
68fe7efd9e
autoformat
2023-11-30 11:24:04 +00:00