145 references to NullLiteralExpression
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Expressions.cs (1)
675
case SyntaxKind.
NullLiteralExpression
:
Binder\EarlyWellKnownAttributeBinder.cs (1)
88
case SyntaxKind.
NullLiteralExpression
:
Parser\LanguageParser.cs (1)
10175
case SyntaxKind.
NullLiteralExpression
:
Syntax\LiteralExpressionSyntax.cs (1)
26
SyntaxKind.
NullLiteralExpression
=> SyntaxKind.NullKeyword,
Syntax\SyntaxKindFacts.cs (1)
553
SyntaxKind.NullKeyword => SyntaxKind.
NullLiteralExpression
,
Microsoft.CodeAnalysis.CSharp.CodeStyle (21)
CastSimplifier.cs (2)
315
var isNullLiteralCast = castedExpressionNode.WalkDownParentheses().IsKind(SyntaxKind.
NullLiteralExpression
);
869
if (otherSide.WalkDownParentheses().Kind() == SyntaxKind.
NullLiteralExpression
)
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (3)
328
if (left.IsKind(SyntaxKind.
NullLiteralExpression
))
335
if (right.IsKind(SyntaxKind.
NullLiteralExpression
))
351
&& constantPattern.Expression.IsKind(SyntaxKind.
NullLiteralExpression
)
CSharpSyntaxKinds.cs (1)
75
public int NullLiteralExpression => (int)SyntaxKind.
NullLiteralExpression
;
CSharpUseCoalesceExpressionForIfNullStatementCheckDiagnosticAnalyzer.cs (2)
45
if (condition is BinaryExpressionSyntax(SyntaxKind.EqualsExpression) { Right: LiteralExpressionSyntax(SyntaxKind.
NullLiteralExpression
) } binary)
50
else if (condition is IsPatternExpressionSyntax { Pattern: ConstantPatternSyntax { Expression: LiteralExpressionSyntax(SyntaxKind.
NullLiteralExpression
) } } isPattern)
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (5)
191
if (condition is BinaryExpressionSyntax(SyntaxKind.EqualsExpression) { Right: LiteralExpressionSyntax(SyntaxKind.
NullLiteralExpression
) } binaryExpression)
200
else if (condition is IsPatternExpressionSyntax { Pattern: ConstantPatternSyntax { Expression: LiteralExpressionSyntax(SyntaxKind.
NullLiteralExpression
) } } isPattern)
210
if (arg0.Kind() == SyntaxKind.
NullLiteralExpression
||
211
arg1.Kind() == SyntaxKind.
NullLiteralExpression
)
217
testedExpression = arg0.Kind() == SyntaxKind.
NullLiteralExpression
? arg1 : arg0;
CSharpUseImplicitTypeHelper.cs (1)
281
if (expression.IsKind(SyntaxKind.
NullLiteralExpression
))
CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
74
right.IsKind(SyntaxKind.
NullLiteralExpression
))
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
334
SyntaxKind.
NullLiteralExpression
or
InvokeDelegateWithConditionalAccessAnalyzer.cs (4)
122
if (condition.Left.IsKind(SyntaxKind.
NullLiteralExpression
) ||
123
condition.Right.IsKind(SyntaxKind.
NullLiteralExpression
))
125
var expr = condition.Left.IsKind(SyntaxKind.
NullLiteralExpression
)
333
=> left.IsKind(SyntaxKind.IdentifierName) && right.IsKind(SyntaxKind.
NullLiteralExpression
);
SpeculationAnalyzer.cs (1)
454
if (previousReplacedExpression.WalkDownParentheses().Kind() is SyntaxKind.
NullLiteralExpression
or SyntaxKind.DefaultLiteralExpression)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
ConvertToRecordHelpers.cs (1)
412
? SyntaxKind.
NullLiteralExpression
CSharpDeclareAsNullableCodeFixProvider.cs (1)
335
SyntaxKind.
NullLiteralExpression
or
CSharpUseIsNullCheckForCastAndEqualityOperatorCodeFixProvider.cs (1)
99
=> binary.Right.IsKind(SyntaxKind.
NullLiteralExpression
)
CSharpUseIsNullCheckForReferenceEqualsCodeFixProvider.cs (1)
24
= LiteralExpression(SyntaxKind.
NullLiteralExpression
);
CSharpUseNullCheckOverTypeCheckCodeFixProvider.cs (1)
27
private static readonly ConstantPatternSyntax s_nullConstantPattern = ConstantPattern(LiteralExpression(SyntaxKind.
NullLiteralExpression
));
CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
127
if (expr.IsKind(SyntaxKind.
NullLiteralExpression
))
ExpressionGenerator.cs (1)
51
=> SyntaxFactory.LiteralExpression(SyntaxKind.
NullLiteralExpression
);
Microsoft.CodeAnalysis.CSharp.Features (27)
ConvertCast\CSharpConvertTryCastToDirectCastCodeRefactoringProvider.cs (1)
57
if (expression.IsKind(SyntaxKind.
NullLiteralExpression
) && nullableContext.HasFlag(NullableContext.AnnotationsEnabled) && isReferenceType)
ConvertToRecordHelpers.cs (1)
412
? SyntaxKind.
NullLiteralExpression
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (3)
328
if (left.IsKind(SyntaxKind.
NullLiteralExpression
))
335
if (right.IsKind(SyntaxKind.
NullLiteralExpression
))
351
&& constantPattern.Expression.IsKind(SyntaxKind.
NullLiteralExpression
)
CSharpDeclareAsNullableCodeFixProvider.cs (1)
335
SyntaxKind.
NullLiteralExpression
or
CSharpUseCoalesceExpressionForIfNullStatementCheckDiagnosticAnalyzer.cs (2)
45
if (condition is BinaryExpressionSyntax(SyntaxKind.EqualsExpression) { Right: LiteralExpressionSyntax(SyntaxKind.
NullLiteralExpression
) } binary)
50
else if (condition is IsPatternExpressionSyntax { Pattern: ConstantPatternSyntax { Expression: LiteralExpressionSyntax(SyntaxKind.
NullLiteralExpression
) } } isPattern)
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (5)
191
if (condition is BinaryExpressionSyntax(SyntaxKind.EqualsExpression) { Right: LiteralExpressionSyntax(SyntaxKind.
NullLiteralExpression
) } binaryExpression)
200
else if (condition is IsPatternExpressionSyntax { Pattern: ConstantPatternSyntax { Expression: LiteralExpressionSyntax(SyntaxKind.
NullLiteralExpression
) } } isPattern)
210
if (arg0.Kind() == SyntaxKind.
NullLiteralExpression
||
211
arg1.Kind() == SyntaxKind.
NullLiteralExpression
)
217
testedExpression = arg0.Kind() == SyntaxKind.
NullLiteralExpression
? arg1 : arg0;
CSharpUseIsNullCheckForCastAndEqualityOperatorCodeFixProvider.cs (1)
99
=> binary.Right.IsKind(SyntaxKind.
NullLiteralExpression
)
CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
74
right.IsKind(SyntaxKind.
NullLiteralExpression
))
CSharpUseIsNullCheckForReferenceEqualsCodeFixProvider.cs (1)
24
= LiteralExpression(SyntaxKind.
NullLiteralExpression
);
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
334
SyntaxKind.
NullLiteralExpression
or
CSharpUseNullCheckOverTypeCheckCodeFixProvider.cs (1)
27
private static readonly ConstantPatternSyntax s_nullConstantPattern = ConstantPattern(LiteralExpression(SyntaxKind.
NullLiteralExpression
));
CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
127
if (expr.IsKind(SyntaxKind.
NullLiteralExpression
))
Debugging\CSharpProximityExpressionsService_ExpressionTermCollector.cs (1)
79
case SyntaxKind.
NullLiteralExpression
:
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
166
if (expression.IsKind(SyntaxKind.
NullLiteralExpression
))
EditAndContinue\SyntaxComparer.cs (1)
525
case SyntaxKind.
NullLiteralExpression
:
IntroduceVariable\CSharpIntroduceVariableService.cs (1)
120
if (expression.IsKind(SyntaxKind.
NullLiteralExpression
))
InvokeDelegateWithConditionalAccessAnalyzer.cs (4)
122
if (condition.Left.IsKind(SyntaxKind.
NullLiteralExpression
) ||
123
condition.Right.IsKind(SyntaxKind.
NullLiteralExpression
))
125
var expr = condition.Left.IsKind(SyntaxKind.
NullLiteralExpression
)
333
=> left.IsKind(SyntaxKind.IdentifierName) && right.IsKind(SyntaxKind.
NullLiteralExpression
);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (74)
Parsing\AsyncParsingTests.cs (3)
2424
N(SyntaxKind.
NullLiteralExpression
);
2527
N(SyntaxKind.
NullLiteralExpression
);
2648
N(SyntaxKind.
NullLiteralExpression
);
Parsing\AwaitParsingTests.cs (1)
1609
N(SyntaxKind.
NullLiteralExpression
);
Parsing\DeclarationParsingTests.cs (13)
7386
N(SyntaxKind.
NullLiteralExpression
);
7429
N(SyntaxKind.
NullLiteralExpression
);
7629
N(SyntaxKind.
NullLiteralExpression
);
7767
N(SyntaxKind.
NullLiteralExpression
);
7810
N(SyntaxKind.
NullLiteralExpression
);
7853
N(SyntaxKind.
NullLiteralExpression
);
7896
N(SyntaxKind.
NullLiteralExpression
);
7939
N(SyntaxKind.
NullLiteralExpression
);
7983
N(SyntaxKind.
NullLiteralExpression
);
8026
N(SyntaxKind.
NullLiteralExpression
);
8070
N(SyntaxKind.
NullLiteralExpression
);
8114
N(SyntaxKind.
NullLiteralExpression
);
8168
N(SyntaxKind.
NullLiteralExpression
);
Parsing\DeclarationScopeParsingTests.cs (4)
942
N(SyntaxKind.
NullLiteralExpression
);
1008
N(SyntaxKind.
NullLiteralExpression
);
1146
N(SyntaxKind.
NullLiteralExpression
);
1271
N(SyntaxKind.
NullLiteralExpression
);
Parsing\FunctionPointerTests.cs (1)
3016
N(SyntaxKind.
NullLiteralExpression
);
Parsing\LambdaParameterParsingTests.cs (11)
2163
N(SyntaxKind.
NullLiteralExpression
);
2257
N(SyntaxKind.
NullLiteralExpression
);
2377
N(SyntaxKind.
NullLiteralExpression
);
2447
N(SyntaxKind.
NullLiteralExpression
);
2527
N(SyntaxKind.
NullLiteralExpression
);
4290
N(SyntaxKind.
NullLiteralExpression
);
4350
N(SyntaxKind.
NullLiteralExpression
);
4424
N(SyntaxKind.
NullLiteralExpression
);
4497
N(SyntaxKind.
NullLiteralExpression
);
4579
N(SyntaxKind.
NullLiteralExpression
);
4669
N(SyntaxKind.
NullLiteralExpression
);
Parsing\LambdaReturnTypeParsingTests.cs (17)
443
N(SyntaxKind.
NullLiteralExpression
);
686
N(SyntaxKind.
NullLiteralExpression
);
761
N(SyntaxKind.
NullLiteralExpression
);
849
N(SyntaxKind.
NullLiteralExpression
);
1986
N(SyntaxKind.
NullLiteralExpression
);
2025
N(SyntaxKind.
NullLiteralExpression
);
2059
N(SyntaxKind.
NullLiteralExpression
);
2094
N(SyntaxKind.
NullLiteralExpression
);
2142
N(SyntaxKind.
NullLiteralExpression
);
2332
N(SyntaxKind.
NullLiteralExpression
);
3096
N(SyntaxKind.
NullLiteralExpression
);
3139
N(SyntaxKind.
NullLiteralExpression
);
3160
N(SyntaxKind.
NullLiteralExpression
);
3208
N(SyntaxKind.
NullLiteralExpression
);
3386
N(SyntaxKind.
NullLiteralExpression
);
3442
N(SyntaxKind.
NullLiteralExpression
);
4963
N(SyntaxKind.
NullLiteralExpression
);
Parsing\NullableParsingTests.cs (3)
123
N(SyntaxKind.
NullLiteralExpression
);
262
N(SyntaxKind.
NullLiteralExpression
);
324
N(SyntaxKind.
NullLiteralExpression
);
Parsing\PatternParsingTests.cs (12)
208
N(SyntaxKind.
NullLiteralExpression
);
632
N(SyntaxKind.
NullLiteralExpression
);
689
N(SyntaxKind.
NullLiteralExpression
);
719
N(SyntaxKind.
NullLiteralExpression
);
749
N(SyntaxKind.
NullLiteralExpression
);
779
N(SyntaxKind.
NullLiteralExpression
);
857
N(SyntaxKind.
NullLiteralExpression
);
874
N(SyntaxKind.
NullLiteralExpression
);
891
N(SyntaxKind.
NullLiteralExpression
);
908
N(SyntaxKind.
NullLiteralExpression
);
8499
N(SyntaxKind.
NullLiteralExpression
);
8654
N(SyntaxKind.
NullLiteralExpression
);
Parsing\StatementAttributeParsingTests.cs (4)
1374
N(SyntaxKind.
NullLiteralExpression
);
1451
N(SyntaxKind.
NullLiteralExpression
);
1538
N(SyntaxKind.
NullLiteralExpression
);
2131
N(SyntaxKind.
NullLiteralExpression
);
Parsing\StatementParsingTests.cs (1)
2742
N(SyntaxKind.
NullLiteralExpression
);
Parsing\SuppressNullableWarningExpressionParsingTests.cs (3)
56
N(SyntaxKind.
NullLiteralExpression
);
170
N(SyntaxKind.
NullLiteralExpression
);
214
N(SyntaxKind.
NullLiteralExpression
);
Syntax\SyntaxTests.cs (1)
234
[InlineData(SyntaxKind.NullKeyword, SyntaxKind.
NullLiteralExpression
)]
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
CastSimplifier.cs (2)
315
var isNullLiteralCast = castedExpressionNode.WalkDownParentheses().IsKind(SyntaxKind.
NullLiteralExpression
);
869
if (otherSide.WalkDownParentheses().Kind() == SyntaxKind.
NullLiteralExpression
)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3253
return SyntaxFactory.LiteralExpression(SyntaxKind.
NullLiteralExpression
);
CSharpSyntaxKinds.cs (1)
75
public int NullLiteralExpression => (int)SyntaxKind.
NullLiteralExpression
;
CSharpUseImplicitTypeHelper.cs (1)
281
if (expression.IsKind(SyntaxKind.
NullLiteralExpression
))
ExpressionGenerator.cs (1)
51
=> SyntaxFactory.LiteralExpression(SyntaxKind.
NullLiteralExpression
);
SpeculationAnalyzer.cs (1)
454
if (previousReplacedExpression.WalkDownParentheses().Kind() is SyntaxKind.
NullLiteralExpression
or SyntaxKind.DefaultLiteralExpression)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (3)
CodeGeneration\SyntaxGeneratorTests.cs (3)
1318
SyntaxKind.
NullLiteralExpression
))
1452
SyntaxKind.
NullLiteralExpression
)))
1460
SyntaxKind.
NullLiteralExpression
)))
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\MethodXml\MethodXmlBuilder.cs (1)
176
case SyntaxKind.
NullLiteralExpression
: