Commit Graph

48 Commits

Author SHA1 Message Date
Tamas Vajk
90579947cf Move all classes to the Semmle.Extraction.CSharp namespace 2024-11-14 09:13:03 +01:00
Michael Nebel
d19c83228e C#: Do not bind comments to compiler generated statements. 2024-02-22 13:33:29 +01:00
Michael Nebel
28d5c11b6f C#: Synthesize an empty body for primary constructors. 2024-02-19 13:04:13 +01:00
Tom Hvitved
6021d00f7e C#: Move some methods into newly created Semmle.Extraction.CSharp.Util project 2023-09-21 11:33:25 +02:00
Michael Nebel
864f60f90f C#: Re-arrange using statements. 2023-08-21 09:41:28 +02:00
Tamas Vajk
51f0a928dc C#: Fix global statement extraction by extracting statements inside the implicit main method context 2022-06-20 10:09:11 +02:00
Tom Hvitved
ef580aa8bc C#: Add more debug context to various error messages 2022-01-26 15:50:26 +01:00
Tom Hvitved
63686b5c4e C#: Use is [not] null throughout in the extractor 2021-03-05 16:28:12 +01:00
Tamas Vajk
10ab17a7e0 C#: Enable nullability in csharp extraction project v1 2021-03-03 14:18:19 +01:00
Tamas Vajk
199e937e9e C#: Rename CachedEntity.symbol to Symbol 2021-02-16 09:13:12 +01:00
Tamas Vajk
67289a498f Share entity base classes between CIL and source extraction 2021-02-16 09:10:24 +01:00
Tamas Vajk
4967664d09 Rework global statement extraction without DB scheme change 2021-02-15 17:47:33 +01:00
Tamas Vajk
b79d5ab44b Fix labeled stmt factory method parameter types 2021-02-15 17:44:44 +01:00
Tamas Vajk
6a4b54ec89 C#: Extract global statements 2021-02-15 17:44:44 +01:00
Tamas Vajk
2de7fbe062 Fix build after rebase 2021-02-15 10:18:12 +01:00
Tamas Vajk
4f693be33b Move location creation to instance method on context 2021-02-15 10:17:08 +01:00
Tamas Vajk
63b0fe10e4 Rework foreach_stmt_info extraction 2021-02-07 09:06:11 +01:00
Tamas Vajk
7c506f445c C#: Extract underlying methods of foreach statements 2021-02-07 09:06:11 +01:00
Tom Hvitved
9a9a57716c C#: Improved extraction of type nullability 2021-01-15 16:01:14 +01:00
Tamas Vajk
19883302af C#: Extract local functions without body 2020-11-25 14:42:40 +01:00
Tamas Vajk
dee1690748 C#: Remove duplicated pattern extraction logic 2020-11-12 14:34:54 +01:00
Tamas Vajk
5a91736b7a C#: Change public fields to properties 2020-10-14 14:44:01 +02:00
Tamas Vajk
2e350caf9f C#: Fix private field and local variable naming 2020-10-13 14:45:37 +02:00
Tamas Vajk
aec4481cfb C#: Use var everywhere 2020-10-13 14:45:37 +02:00
Tamas Vajk
7d544e34af C#: Add declaration visibility modifiers 2020-10-13 14:45:37 +02:00
Tamas Vajk
ec6ed90c49 C#: Add final new line to files 2020-10-13 13:27:46 +02:00
Tamas Vajk
b793af571e C#: Remove unnecessary usings 2020-10-13 13:27:45 +02:00
Tom Hvitved
b79fc87961 C#: Split up localvars database relation into two relations 2019-11-28 14:30:21 +01:00
Tom Hvitved
4f2ca11d2c C#: Suppress cs/similar-file alerts 2019-09-30 19:26:02 +02:00
Calum Grant
fe7e90e25a C#: Remove the tuples from the C# extractor. 2019-08-30 10:11:00 +01:00
Calum Grant
486c192dda C#: Refactoring expression and statement population. 2019-08-30 10:11:00 +01:00
Calum Grant
bd1b0018b0 C#: Rename some methods. 2019-08-30 10:00:06 +01:00
Calum Grant
0e62377dd2 C#: Treat _ as an ordinary variable in a foreach. 2019-08-29 18:11:00 +01:00
Calum Grant
620ecc8128 C#: Address review comments part 1. 2019-06-26 20:24:56 +01:00
Calum Grant
4aa1947a23 C#: Implement type annotations for nullability, parameter kinds and method returns. 2019-06-26 20:24:55 +01:00
Calum Grant
73c2898666 C#: Minor edits. 2019-06-04 18:10:49 +01:00
Calum Grant
15cd1d274a C#: Implement using declaration statements. 2019-06-04 18:10:49 +01:00
Tom Hvitved
2d0554a7ee C#: Address review comments 2019-06-03 16:00:22 +02:00
Tom Hvitved
25cb01ffea C#: Handle discard variable declarations in switch expressions 2019-06-03 15:50:41 +02:00
Tom Hvitved
8c1cab2d03 C#: Simplify extraction of is expressions and case statements 2019-06-03 15:50:41 +02:00
Tom Hvitved
a1e58cedac C#: Refactor recursive patterns implementation
- 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.
2019-05-24 13:49:05 +01:00
Calum Grant
aecc9e2a57 C#: Fix LGTM warnings 2019-05-24 13:49:05 +01:00
calum
1428d0ba93 C#: Implement recursive patterns 2019-05-24 13:49:05 +01:00
calum
343cddcbb7 C#: Refactor extractor errors and log extractor errors to the database. 2019-05-13 09:18:52 +01:00
calum
c28fa7ed3f C#: Handle VarPatternSyntax class introduced by Roslyn 3.0.0 2019-05-07 18:01:37 +01:00
calum
de4f592bba C#: Add alert suppression comments for cs/similar-file 2019-01-11 12:36:20 +00:00
calum
8d072863df C#: Reorder for statements to ensure variables declared in the condition are declared before they are used. 2018-12-11 10:31:45 +00:00
calum
103d140e71 C#: Migrate extractor to this repository. 2018-10-10 14:40:52 +01:00