mirror of
https://github.com/github/codeql.git
synced 2025-12-19 10:23:15 +01:00
- Extract names of properties in a propery match, using the `exprorstmt_name` relation. - Simplify extraction of properties by not distinguishing between top-level patterns and nested patterns. - Introduce `PatternExpr` to capture patterns in `is` expressions, `case` statements, and `switch` expression arms. - Generalize `IsTypeExpr`, `IsPatternExpr`, `IsRecursivePatternExpr`, and `IsConstantExpr` to just `IsExpr` with a member predicate `PatternExpr getPattern()`. - Generalize `TypeCase`, `RecursivePatternCase`, and `ConstCase` to just `CaseStmt` with a member predicate `PatternExpr getPattern()`. - Introduce classes `Switch` and `Case` as base classes of switch statements/expressions and case statements/switch expression arms, respectively. - Simplify CFG logic using the generalized classes. - Generalize guards library to cover `switch` expressions tests. - Generalize data flow library to cover `switch` expression assignments.
6 lines
484 B
Plaintext
6 lines
484 B
Plaintext
| CSharp7.cs:234:13:234:23 | ... is ... | Int32 | CSharp7.cs:234:18:234:23 | Int32 i1 | false |
|
|
| CSharp7.cs:238:18:238:31 | ... is ... | String | CSharp7.cs:238:23:238:31 | String s1 | false |
|
|
| CSharp7.cs:245:18:245:28 | ... is ... | Object | CSharp7.cs:245:23:245:28 | Object v1 | true |
|
|
| CSharp7.cs:255:27:255:40 | ... is ... | String | CSharp7.cs:255:32:255:40 | String s4 | false |
|
|
| CSharp7.cs:298:30:298:39 | ... is ... | Int32 | CSharp7.cs:298:35:298:39 | Int32 y | false |
|