86 references to DefaultLiteralExpression
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Expressions.cs (1)
713case SyntaxKind.DefaultLiteralExpression:
Binder\Binder_Patterns.cs (1)
475case SyntaxKind.DefaultLiteralExpression:
Parser\LanguageParser.cs (2)
10847case SyntaxKind.DefaultLiteralExpression: 12091return _syntaxFactory.LiteralExpression(SyntaxKind.DefaultLiteralExpression, keyword);
Syntax\LiteralExpressionSyntax.cs (1)
27SyntaxKind.DefaultLiteralExpression => SyntaxKind.DefaultKeyword,
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
370SyntaxKind.DefaultLiteralExpression or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DefaultExpressionSyntaxExtensions.cs (1)
16SyntaxFactory.LiteralExpression(SyntaxKind.DefaultLiteralExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
84public int DefaultLiteralExpression => (int)SyntaxKind.DefaultLiteralExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
186var isDefaultLiteralCast = castedExpressionNode.WalkDownParentheses().IsKind(SyntaxKind.DefaultLiteralExpression); 852if (originalConditionalExpression.WhenTrue.WalkDownParentheses().IsKind(SyntaxKind.DefaultLiteralExpression) || 853originalConditionalExpression.WhenFalse.WalkDownParentheses().IsKind(SyntaxKind.DefaultLiteralExpression))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (2)
303if (expression.WalkDownParentheses().IsKind(SyntaxKind.DefaultLiteralExpression)) 467if (previousReplacedExpression.WalkDownParentheses().Kind() is SyntaxKind.NullLiteralExpression or SyntaxKind.DefaultLiteralExpression)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
415: SyntaxKind.DefaultLiteralExpression);
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
320SyntaxKind.DefaultLiteralExpression or
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
45token.Parent is LiteralExpressionSyntax(SyntaxKind.DefaultLiteralExpression) defaultLiteral)
src\Analyzers\CSharp\CodeFixes\UseDefaultLiteral\CSharpUseDefaultLiteralCodeFixProvider.cs (1)
60SyntaxFactory.LiteralExpression(SyntaxKind.DefaultLiteralExpression).WithTriviaFrom(defaultExpression)),
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
134a => a.Expression.Kind() != SyntaxKind.DefaultLiteralExpression && Equals(arrayElementType, semanticModel.GetTypeInfo(a.Expression).Type));
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
117if (expr.IsKind(SyntaxKind.DefaultLiteralExpression))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
CodeGen\CodeGenFunctionPointersTests.cs (1)
4921.Where(l => l.IsKind(SyntaxKind.DefaultLiteralExpression))
CodeGen\CodeGenTupleEqualityTests.cs (5)
1056.Where(e => e.Kind() == SyntaxKind.DefaultLiteralExpression); 1090.Where(e => e.Kind() == SyntaxKind.DefaultLiteralExpression); 1122.Where(e => e.Kind() == SyntaxKind.DefaultLiteralExpression); 1153.Where(e => e.Kind() == SyntaxKind.DefaultLiteralExpression); 1212.Where(e => e.Kind() == SyntaxKind.DefaultLiteralExpression);
Microsoft.CodeAnalysis.CSharp.Features (7)
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
370SyntaxKind.DefaultLiteralExpression or
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
415: SyntaxKind.DefaultLiteralExpression);
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
320SyntaxKind.DefaultLiteralExpression or
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
45token.Parent is LiteralExpressionSyntax(SyntaxKind.DefaultLiteralExpression) defaultLiteral)
src\Analyzers\CSharp\CodeFixes\UseDefaultLiteral\CSharpUseDefaultLiteralCodeFixProvider.cs (1)
60SyntaxFactory.LiteralExpression(SyntaxKind.DefaultLiteralExpression).WithTriviaFrom(defaultExpression)),
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
134a => a.Expression.Kind() != SyntaxKind.DefaultLiteralExpression && Equals(arrayElementType, semanticModel.GetTypeInfo(a.Expression).Type));
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
117if (expr.IsKind(SyntaxKind.DefaultLiteralExpression))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\NullCoalesceAssignmentTests.cs (1)
184var defaultLiteral = syntaxRoot.DescendantNodes().OfType<LiteralExpressionSyntax>().Where(expr => expr.IsKind(SyntaxKind.DefaultLiteralExpression)).Single();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (40)
Parsing\DeclarationScopeParsingTests.cs (7)
262N(SyntaxKind.DefaultLiteralExpression); 335N(SyntaxKind.DefaultLiteralExpression); 364N(SyntaxKind.DefaultLiteralExpression); 456N(SyntaxKind.DefaultLiteralExpression); 2526N(SyntaxKind.DefaultLiteralExpression); 9218N(SyntaxKind.DefaultLiteralExpression); 13147N(SyntaxKind.DefaultLiteralExpression);
Parsing\ExpressionParsingTests.cs (1)
4764Assert.Equal(SyntaxKind.DefaultLiteralExpression, expr.Kind());
Parsing\LambdaReturnTypeParsingTests.cs (22)
66N(SyntaxKind.DefaultLiteralExpression); 195N(SyntaxKind.DefaultLiteralExpression); 478N(SyntaxKind.DefaultLiteralExpression); 508N(SyntaxKind.DefaultLiteralExpression); 538N(SyntaxKind.DefaultLiteralExpression); 582N(SyntaxKind.DefaultLiteralExpression); 656N(SyntaxKind.DefaultLiteralExpression); 1431N(SyntaxKind.DefaultLiteralExpression); 1472N(SyntaxKind.DefaultLiteralExpression); 2331N(SyntaxKind.DefaultLiteralExpression); 4965N(SyntaxKind.DefaultLiteralExpression); 5068N(SyntaxKind.DefaultLiteralExpression); 5108N(SyntaxKind.DefaultLiteralExpression); 5144N(SyntaxKind.DefaultLiteralExpression); 5218N(SyntaxKind.DefaultLiteralExpression); 5321N(SyntaxKind.DefaultLiteralExpression); 5459N(SyntaxKind.DefaultLiteralExpression); 5554N(SyntaxKind.DefaultLiteralExpression); 5609N(SyntaxKind.DefaultLiteralExpression); 5710N(SyntaxKind.DefaultLiteralExpression); 5776N(SyntaxKind.DefaultLiteralExpression); 5833N(SyntaxKind.DefaultLiteralExpression);
Parsing\MemberDeclarationParsingTests.cs (2)
11541N(SyntaxKind.DefaultLiteralExpression); 11865N(SyntaxKind.DefaultLiteralExpression);
Parsing\NameParsingTests.cs (1)
1486N(SyntaxKind.DefaultLiteralExpression);
Parsing\NullableParsingTests.cs (1)
2312N(SyntaxKind.DefaultLiteralExpression);
Parsing\StatementAttributeParsingTests.cs (2)
2599N(SyntaxKind.DefaultLiteralExpression); 4733N(SyntaxKind.DefaultLiteralExpression);
Parsing\SwitchExpressionParsingTests.cs (4)
2343N(SyntaxKind.DefaultLiteralExpression); 2407N(SyntaxKind.DefaultLiteralExpression); 2617N(SyntaxKind.DefaultLiteralExpression); 2710N(SyntaxKind.DefaultLiteralExpression);
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
Simplification\Reducers\CSharpDefaultExpressionReducer.Rewriter.cs (1)
37return SyntaxFactory.LiteralExpression(SyntaxKind.DefaultLiteralExpression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DefaultExpressionSyntaxExtensions.cs (1)
16SyntaxFactory.LiteralExpression(SyntaxKind.DefaultLiteralExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
84public int DefaultLiteralExpression => (int)SyntaxKind.DefaultLiteralExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
186var isDefaultLiteralCast = castedExpressionNode.WalkDownParentheses().IsKind(SyntaxKind.DefaultLiteralExpression); 852if (originalConditionalExpression.WhenTrue.WalkDownParentheses().IsKind(SyntaxKind.DefaultLiteralExpression) || 853originalConditionalExpression.WhenFalse.WalkDownParentheses().IsKind(SyntaxKind.DefaultLiteralExpression))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (2)
303if (expression.WalkDownParentheses().IsKind(SyntaxKind.DefaultLiteralExpression)) 467if (previousReplacedExpression.WalkDownParentheses().Kind() is SyntaxKind.NullLiteralExpression or SyntaxKind.DefaultLiteralExpression)
Microsoft.Interop.SourceGeneration (5)
Marshalling\DelegateMarshaller.cs (2)
54LiteralExpression(SyntaxKind.DefaultLiteralExpression))); 67LiteralExpression(SyntaxKind.DefaultLiteralExpression)),
Marshalling\MarshallerHelpers.cs (2)
278LiteralExpression(SyntaxKind.DefaultLiteralExpression, Token(SyntaxKind.DefaultKeyword))); 287LiteralExpression(SyntaxKind.DefaultLiteralExpression, Token(SyntaxKind.DefaultKeyword)));
Utils\SyntaxFactoryExtensions.cs (1)
20return Declare(typeSyntax, identifier, initializeToDefault ? LiteralExpression(SyntaxKind.DefaultLiteralExpression) : null);