mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Address review comments.
This commit is contained in:
@@ -157,7 +157,7 @@ public class OutParam
|
|||||||
public void Test()
|
public void Test()
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
Fn(out x); // Missing Alert
|
Fn(out x); // $ MISSING: Alert
|
||||||
Fn(out _); // GOOD
|
Fn(out _); // GOOD
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ public class Captured
|
|||||||
|
|
||||||
void M2()
|
void M2()
|
||||||
{
|
{
|
||||||
var x = M6(); // Missing Alert
|
var x = M6(); // $ MISSING: Alert
|
||||||
Action a = () =>
|
Action a = () =>
|
||||||
{
|
{
|
||||||
x = 1; // GOOD
|
x = 1; // GOOD
|
||||||
@@ -208,7 +208,7 @@ public class Captured
|
|||||||
int x;
|
int x;
|
||||||
Action a = () =>
|
Action a = () =>
|
||||||
{
|
{
|
||||||
x = 1; // Missing Alert
|
x = 1; // $ MISSING: Alert
|
||||||
};
|
};
|
||||||
a();
|
a();
|
||||||
}
|
}
|
||||||
@@ -230,7 +230,7 @@ public class Captured
|
|||||||
|
|
||||||
void M5()
|
void M5()
|
||||||
{
|
{
|
||||||
int x = 0; // Missing Alert.
|
int x = 0; // $ MISSING: Alert
|
||||||
Action a = () =>
|
Action a = () =>
|
||||||
{
|
{
|
||||||
x = 1; // GOOD
|
x = 1; // GOOD
|
||||||
@@ -250,7 +250,7 @@ public class Captured
|
|||||||
int captured = 0; // GOOD: Variable captured variable
|
int captured = 0; // GOOD: Variable captured variable
|
||||||
fn(() => { return captured; });
|
fn(() => { return captured; });
|
||||||
|
|
||||||
return captured = 1; // Missing Alert.
|
return captured = 1; // $ MISSING: Alert
|
||||||
}
|
}
|
||||||
|
|
||||||
void M7()
|
void M7()
|
||||||
|
|||||||
Reference in New Issue
Block a user