Chris Smowton
dcebcc35b6
Rename getPatternAtIndex
2024-03-25 16:36:38 +00:00
Chris Smowton
a4401963f5
Use getAPattern
2024-03-25 16:31:39 +00:00
Chris Smowton
ee36e3b72b
autoformat
2024-03-25 16:31:38 +00:00
Chris Smowton
c7cb885e71
Add missing javadoc and getUniquePattern predicate
2024-03-25 16:31:36 +00:00
Chris Smowton
f44becea7f
Implement multiple pattern case and fall-through pattern case support
2024-03-25 16:31:36 +00:00
Chris Smowton
94819e37c4
More StmtParent -> SwitchBlock
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
561f06a4bd
Remove unused predicate
2023-11-30 11:24:06 +00:00
Chris Smowton
beb827b1d0
Remove unused predicate
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
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
c1814408f0
Fix guard basic block for switch cases
2023-11-30 11:24:04 +00:00
Chris Smowton
6e868d21bd
Make DefaultCase include NullDefaultCase
2023-11-30 11:24:03 +00:00
Chris Smowton
d2ff1baff0
Replace getDefaultOrNullDefaultCase with getDefaultCase
2023-11-30 11:24:03 +00:00
Chris Smowton
176adf4376
Move PatternExpr to correct file
2023-11-30 11:24:02 +00:00
Chris Smowton
de2b98f4a1
Fix hasNullCase
2023-11-30 11:24:02 +00:00
Chris Smowton
2a6e86633d
Improve qldoc
2023-11-30 11:24:01 +00:00
Chris Smowton
11444a3ae7
Rename Pattern to PatternExpr to avoid clashing with Regex::Pattern
2023-11-30 11:24:01 +00:00
Chris Smowton
ded8deceaa
Add missing qldoc
2023-11-30 11:24:01 +00:00
Chris Smowton
05addde957
Adapt control-flow graph to record patterns
2023-11-30 11:24:00 +00:00
Chris Smowton
556feb31f0
Autoformat
2023-11-30 11:24:00 +00:00
Chris Smowton
daccd04087
Basic extraction of record patterns
2023-11-30 11:23:59 +00:00
Chris Smowton
54a89d6fef
Handle 'case null, default:'
2023-11-30 11:23:59 +00:00
Chris Smowton
ba0f3cf718
Add basic support for case guards
2023-11-30 11:23:59 +00:00
Chris Smowton
6b9aed21df
Nullness library: recognise switches with null checks
2023-11-30 11:23:58 +00:00
Chris Smowton
30c5885966
Fix constant cases relating to enum types
2023-11-30 11:23:58 +00:00
Chris Smowton
6c990c2cf6
Add pattern-case support and generally debug switch CFGs
...
These were reasonably broken beforehand, due to not taking switch rules into account in enough places, and confusing the expression/statement switch rule distinction with the distinction between switch statements and expressions.
(For example, `switch(x) { 1 -> System.out.println("Hello world") ... }` is a statement, but has a rule expression).
2023-11-30 11:23:58 +00:00
Chris Smowton
f4b45fa511
Support switch cases with binding patterns
2023-11-30 11:23:58 +00:00
erik-krogh
a4e5d752e1
Java: delete old deprecations
2022-11-17 22:12:50 +01:00
Ian Lynagh
501a9b3c6b
Make *.qll non-executable
2022-08-24 16:36:15 +01:00
Tamas Vajk
dabc956dbf
Unify loop break/continue statement handling between java and kotlin
2022-06-23 08:45:11 +02:00
Tamas Vajk
a50e062b3c
Kotlin: Fix enclosing statement of when branches
2022-06-22 09:10:27 +02:00
Ian Lynagh
86bf126ed8
Kotlin: Pull Kotlin type for expressions out into its own table
2022-05-10 19:51:15 +01:00
Tamas Vajk
fa5c3f9159
Remove and replace @anonymousclassdeclstmt with @localtypedeclstmt
2022-05-10 19:51:10 +01:00
Tamas Vajk
afabe652c1
Add anonymous class declaration stmt
2022-05-10 19:51:05 +01:00
Ian Lynagh
cd41d5b9cf
Kotlin: Add KotlinType to exprs
2022-05-10 18:46:01 +01:00
Tamas Vajk
5aac46f20f
Fix DB relation names to use plurals
2022-05-10 18:45:58 +01:00
Tamas Vajk
32a61c16cb
Add break/continue QL and tests
2022-05-10 18:45:58 +01:00
Anders Schack-Mulligen
cbdd4927ce
Merge pull request #8582 from Marcono1234/marcono1234/JumpStmt-superclass
...
Java: Make `JumpStmt` a proper superclass
2022-04-25 12:22:20 +02:00
Anders Schack-Mulligen
b21f077e8e
Update java/ql/lib/semmle/code/java/Statement.qll
2022-04-25 11:02:23 +02:00
Marcono1234
348a186df8
Java: Make JumpStmt a concrete class again
...
Public abstract classes can be error-prone, when users unintentionally
implement a new subclass instead of refining the set of existing subclasses.
2022-04-10 17:54:47 +02:00
Chris Smowton
c2d461bcee
Format
2022-03-31 12:19:53 +01:00
Chris Smowton
0d9c353c37
Represent switch statement and switch expression results alike
2022-03-31 12:19:11 +01:00
Chris Smowton
96bf754f01
Accept intrigus suggested doc clarifications
...
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com >
2022-03-31 12:09:45 +01:00
Chris Smowton
19cd97e426
Java: Clarify the meaning of getRuleExpression/Statement
2022-03-30 17:58:11 +01:00
Marcono1234
a93b4ed0f2
Java: Make JumpStmt a proper superclass
2022-03-30 00:30:27 +02:00
Ian Lynagh
2116e6d120
Java: Add ErrorExpr, ErrorStmt
2022-03-15 17:30:19 +00:00
Erik Krogh Kristensen
f924d69dbd
Java: remove deprecations that were recently updated from an automated patch of mine
2022-03-09 18:28:11 +01:00
Erik Krogh Kristensen
a86f0afb3c
delete all deprecations that are over 14 months old
2022-03-09 18:28:07 +01:00