56 Commits

Author SHA1 Message Date
Michael Nebel
443c183e41 C#: Only extract locations for unbound declarations (if a declaration can be unfound) and don't extract empty locations. 2025-09-30 11:33:21 +02:00
Michael Nebel
908a3e3563 C#: Make synthetic ToString calls in binary add expressions. 2025-01-14 17:13:46 +01:00
Michael Nebel
0fc46f5855 C#: Fix compiler warnings related to errors in XML comments. 2024-11-19 16:30:48 +01:00
Tamas Vajk
b7098b72a4 Move location-like entities to the Semmle.Extraction.CSharp namespace 2024-11-13 14:24:08 +01:00
Tom Hvitved
1c344d6735 C#: Adjust conditional access locations 2024-04-10 16:21:58 +02:00
Tom Hvitved
d93d6585d9 C#: Mark more expressions as compiler generated 2024-04-03 20:03:02 +02:00
Michael Nebel
bf4e3a7d1c C#: Merge expr_compiler_generated and compiler_generated and add compiler generated statements. 2024-02-26 13:51:06 +01:00
Michael Nebel
9aeba5063f C#: Use cast expressions for object defaults. 2023-12-08 15:37:12 +01:00
Michael Nebel
aac3ec81f2 C#: Add generated cast expression for nuint and nint parameter defaults. 2023-12-07 13:14:24 +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
Michael Nebel
43d6bf04b5 C#: Make synthetic implicit casts when values are provided using the DefaultParameterValue attribute. 2023-05-31 14:45:19 +02:00
Michael Nebel
2ca543e217 C#: Synthetic DateTime object creation for DateTime defaults via attributes. 2023-05-22 14:16:37 +02:00
Michael Nebel
99b7bc3b73 C#: Implement extractor support for unsigned right shift. 2023-01-12 19:06:28 +01:00
Josh Soref
cfb3329428 spelling: representation
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-19 03:49:17 -04:00
Tom Hvitved
a1bbe58516 C#: More uses of PopulateArguments 2022-01-04 13:47:55 +01:00
Tom Hvitved
888a1b38aa C#: Handle Nullable<T> default parameter values in assemblies 2021-10-15 14:23:18 +02:00
Tamas Vajk
31ac6442e8 C#: Fix default parameter value generation in case of error symbols 2021-05-10 17:03:08 +02:00
Tamas Vajk
a0f5e45ae9 C#: Fix special case of default argument value extraction 2021-04-21 16:34:29 +02:00
Tamas Vajk
a790eb8110 Fix for unconstrained generic types 2021-04-08 12:20:01 +02:00
Tamas Vajk
551a7ce9e5 Fix expression value of struct default argument values 2021-04-08 12:14:53 +02:00
Tamas Vajk
cb9a9db356 C# Improve default argument value extraction 2021-04-08 12:07:22 +02:00
Tamás Vajk
24140195d6 Merge pull request #5242 from tamasvajk/feature/tuple-df
C#: Add tuple dataflow
2021-03-16 11:45:11 +01:00
Tamas Vajk
4709442ef3 Extract tuple types from patterns and variable declarations 2021-03-09 09:14:23 +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
e8fd6e1112 Move classes to seperate files 2021-02-15 10:17:07 +01:00
Tamas Vajk
a5dec5b4aa C#: Limit ancestor traversal for 'if' and 'elif' lookup 2021-02-04 08:42:38 +01:00
Tamas Vajk
41fbce0ad0 Extract #if directives 2021-02-04 08:42:38 +01:00
Tamas Vajk
a11d852054 Fix address of unary operator extraction 2021-01-19 17:26:31 +01:00
Tom Hvitved
9a9a57716c C#: Improved extraction of type nullability 2021-01-15 16:01:14 +01:00
Tom Hvitved
e57134e8a4 C#: Address comments 2020-11-11 09:54:51 +01:00
Tom Hvitved
d6515e7963 C#: Changes to extraction of attributes in assemblies
- Only cache on `AttributeData` and not the parent entity.
- Move `CreateGeneratedExpressionFromArgument` to `Expression.cs`.
- Restructure the various `CreateGenerated` methods so child entities are
  created inside them (and therefore no need to expose child index logic).
- Add locations to generated expressions.
- Avoid linear lookup in `CompilationUnit.cs`.
- Consolidate tests.
2020-11-11 09:54:51 +01:00
Tamas Vajk
5a91736b7a C#: Change public fields to properties 2020-10-14 14:44:01 +02:00
Tamas Vajk
fbc128fcc7 C#: Fix type parameter names 2020-10-13 14:45:37 +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
115a216ea9 C#: Format nested ternary operators 2020-10-13 13:27:46 +02:00
Tamas Vajk
e208f3d21d C#: Simplify null checks with pattern matching, ??, and ?: 2020-10-13 13:27:46 +02:00
Tamás Vajk
9ef827641f C#: Add .editorconfig file (#4129) 2020-08-26 12:41:00 +02:00
Calum Grant
bcd8dca780 C#: When creating conditionally accessed expressions, use the typeinfo from the conditional expression to ensure correct flow state and type nullability. 2020-01-07 18:39:51 +00:00
Calum Grant
6c9ebaba0b C#: Populate expression type nullability and nullable flow state. 2020-01-07 18:38:58 +00:00
Calum Grant
0129b42c54 C#: Address review comments. 2019-08-30 10:11:01 +01: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
4aa1947a23 C#: Implement type annotations for nullability, parameter kinds and method returns. 2019-06-26 20:24:55 +01:00