Skip to content

Commit 19b7574

Browse files
committed
C#: Fix issue with suppress nullable warning directly on a method call.
1 parent 1e59def commit 19b7574

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

csharp/extractor/Semmle.Extraction.CSharp/Entities/CallTypeExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ internal static class CallTypeExtensions
99
/// </summary>
1010
public static ExprKind AdjustKind(this Expression.CallType ct, ExprKind k)
1111
{
12-
if (k == ExprKind.ADDRESS_OF)
12+
if (k == ExprKind.ADDRESS_OF || k == ExprKind.SUPPRESS_NULLABLE_WARNING)
1313
{
1414
return k;
1515
}

csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/PostfixUnary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ private PostfixUnary(ExpressionNodeInfo info, ExprKind kind, ExpressionSyntax op
2121
protected override void PopulateExpression(TextWriter trapFile)
2222
{
2323
Create(Context, operand, this, 0);
24-
OperatorCall(trapFile, Syntax);
2524

2625
if ((operatorKind == ExprKind.POST_INCR || operatorKind == ExprKind.POST_DECR) &&
2726
Kind == ExprKind.OPERATOR_INVOCATION)
2827
{
28+
OperatorCall(trapFile, Syntax);
2929
trapFile.mutator_invocation_mode(this, 2);
3030
}
3131
}

0 commit comments

Comments
 (0)