Skip to content

Commit 1948446

Browse files
committed
Address review comments
1 parent 96e71c7 commit 1948446

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

change-notes/1.24/analysis-csharp.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ The following changes in version 1.24 affect C# analysis in all applications.
2727
## Changes to code extraction
2828

2929
* Tuple expressions, for example `(int,bool)` in `default((int,bool))` are now extracted correctly.
30-
* Expression nullability flow state is extracted.
31-
* `stackalloc` array creations are now extracted, and they are represented by the class `Stackalloc`.
30+
* Expression nullability flow state is extracted.
3231
* Implicitly typed `stackalloc` expressions are now extracted correctly.
32+
* The difference between `stackalloc` array creations and normal array creations is extracted.
3333

3434
## Changes to libraries
3535

@@ -40,5 +40,6 @@ The following changes in version 1.24 affect C# analysis in all applications.
4040
* The taint tracking library now tracks flow through (implicit or explicit) conversion operator calls.
4141
* [Code contracts](https://docs.microsoft.com/en-us/dotnet/framework/debug-trace-profile/code-contracts) are now recognized, and are treated like any other assertion methods.
4242
* Expression nullability flow state is given by the predicates `Expr.hasNotNullFlowState()` and `Expr.hasMaybeNullFlowState()`.
43+
* `stackalloc` array creations are now represented by the QL class `Stackalloc`. Previously they were represented by the class `ArrayCreation`.
4344

4445
## Changes to autobuilder

csharp/ql/src/semmle/code/csharp/exprs/Creation.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,9 @@ class ArrayCreation extends Expr, @array_creation_expr {
372372
override string toString() { result = "array creation of type " + this.getType().getName() }
373373
}
374374

375-
/** A `stackalloc` array creation. */
375+
/**
376+
* A `stackalloc` array creation, for example `stackalloc char[] { 'x', 'y' }`.
377+
*/
376378
class Stackalloc extends ArrayCreation {
377379
Stackalloc() { stackalloc_array_creation(this) }
378380
}

0 commit comments

Comments
 (0)