142 references to IsExpression
Microsoft.CodeAnalysis.CSharp (11)
Binder\Binder.IdentifierUsedAsValueFinder.cs (2)
77!(id.Parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.IsExpression } isExpression && 157!(expression.Parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.IsExpression } isExpression &&
Binder\Binder_Expressions.cs (1)
664case SyntaxKind.IsExpression:
Compiler\MethodCompiler.cs (3)
2055!(expression.Parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.IsExpression } isExpression && 2095!(id.Parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.IsExpression } isExpression && 2142if (parent is BinaryExpressionSyntax { RawKind: (int)SyntaxKind.IsExpression } isExpression && isExpression.Right == child)
Parser\LanguageParser.cs (3)
10728case SyntaxKind.IsExpression: 11068if (operatorExpressionKind == SyntaxKind.IsExpression) 11382TypeSyntax type => _syntaxFactory.BinaryExpression(SyntaxKind.IsExpression, leftOperand, opToken, type),
Syntax\SyntaxFacts.cs (1)
138case IsExpression:
Syntax\SyntaxKindFacts.cs (1)
624return SyntaxKind.IsExpression;
Microsoft.CodeAnalysis.CSharp.CodeStyle (13)
src\Analyzers\CSharp\Analyzers\AddRequiredParentheses\CSharpAddRequiredExpressionParenthesesDiagnosticAnalyzer.cs (1)
46SyntaxKind.IsExpression,
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
28=> context.RegisterSyntaxNodeAction(AnalyzeSyntax, SyntaxKind.IsExpression, SyntaxKind.IsPatternExpression);
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
96var defAssignedWhenTrue = _comparison.Kind() is SyntaxKind.NotEqualsExpression or SyntaxKind.IsExpression;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (2)
54SyntaxKind.IsExpression, 354&& comparisonKind == SyntaxKind.IsExpression)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
61blockStartContext.RegisterSyntaxNodeAction(SyntaxNodeAction, SyntaxKind.IsExpression));
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
82BinaryExpressionSyntax(SyntaxKind.IsExpression) { Right: TypeSyntax type } isExpression
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
87if (initializerExpression.Kind() is SyntaxKind.CastExpression or SyntaxKind.IsExpression or SyntaxKind.AsExpression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
557case SyntaxKind.IsExpression: 768case SyntaxKind.IsExpression:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
102public int IsTypeExpression => (int)SyntaxKind.IsExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
483if (castNode.WalkUpParentheses().Parent is BinaryExpressionSyntax(SyntaxKind.IsExpression) isExpression &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
673if (binaryExpression.Kind() is SyntaxKind.AsExpression or SyntaxKind.IsExpression &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (2)
70Debug.Assert(node.Kind() is SyntaxKind.IsExpression or SyntaxKind.IsPatternExpression); 78n => n.Kind() is SyntaxKind.IsExpression or SyntaxKind.IsPatternExpression);
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (1)
54SyntaxKind.IsExpression,
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorCodeFixProvider.cs (1)
88SyntaxKind.IsExpression,
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsCodeFixProvider.cs (1)
52SyntaxKind.IsExpression,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
3018token.Parent?.Parent is BinaryExpressionSyntax(SyntaxKind.IsExpression) binaryExpression &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
100kind: SyntaxKind.IsExpression,
Microsoft.CodeAnalysis.CSharp.Features (19)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (3)
274TypeSyntax type when originalReceiver.IsParentKind(IsExpression) => TypePattern(type), 359BinaryExpressionSyntax(IsExpression) { Right: NullableTypeSyntax type } expr => (expr.Left, type.ElementType, Flipped: false), 360BinaryExpressionSyntax(IsExpression) { Right: TypeSyntax type } expr => (expr.Left, type, Flipped: false),
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
468if (token.Parent.IsParentKind(SyntaxKind.IsExpression))
Debugging\CSharpProximityExpressionsService_ExpressionTermCollector.cs (1)
372case SyntaxKind.IsExpression:
SimplifyTypeNames\SimplifyTypeNamesCodeFixProvider.cs (1)
57if (annotatedexpressionSyntax.Kind() is SyntaxKind.IsExpression or SyntaxKind.AsExpression)
src\Analyzers\CSharp\Analyzers\AddRequiredParentheses\CSharpAddRequiredExpressionParenthesesDiagnosticAnalyzer.cs (1)
46SyntaxKind.IsExpression,
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
28=> context.RegisterSyntaxNodeAction(AnalyzeSyntax, SyntaxKind.IsExpression, SyntaxKind.IsPatternExpression);
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
96var defAssignedWhenTrue = _comparison.Kind() is SyntaxKind.NotEqualsExpression or SyntaxKind.IsExpression;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (2)
54SyntaxKind.IsExpression, 354&& comparisonKind == SyntaxKind.IsExpression)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
61blockStartContext.RegisterSyntaxNodeAction(SyntaxNodeAction, SyntaxKind.IsExpression));
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
82BinaryExpressionSyntax(SyntaxKind.IsExpression) { Right: TypeSyntax type } isExpression
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (2)
70Debug.Assert(node.Kind() is SyntaxKind.IsExpression or SyntaxKind.IsPatternExpression); 78n => n.Kind() is SyntaxKind.IsExpression or SyntaxKind.IsPatternExpression);
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (1)
54SyntaxKind.IsExpression,
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorCodeFixProvider.cs (1)
88SyntaxKind.IsExpression,
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\CSharpUseIsNullCheckForReferenceEqualsCodeFixProvider.cs (1)
52SyntaxKind.IsExpression,
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
59context.RegisterSyntaxNodeAction(context => SyntaxNodeAction(context, expressionTypeOpt), SyntaxKind.IsExpression);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (81)
IncrementalParsing\BinaryExpression.cs (2)
150MakeBinOpChange(SyntaxKind.AddExpression, SyntaxKind.IsExpression); 267case SyntaxKind.IsExpression:
Parsing\AsyncParsingTests.cs (2)
2658N(SyntaxKind.IsExpression); 2749N(SyntaxKind.IsExpression);
Parsing\AwaitParsingTests.cs (10)
1158N(SyntaxKind.IsExpression); 1195N(SyntaxKind.IsExpression); 1248N(SyntaxKind.IsExpression); 1301N(SyntaxKind.IsExpression); 1383N(SyntaxKind.IsExpression); 1463N(SyntaxKind.IsExpression); 1542N(SyntaxKind.IsExpression); 1633N(SyntaxKind.IsExpression); 1700N(SyntaxKind.IsExpression); 1754N(SyntaxKind.IsExpression);
Parsing\CollectionExpressionParsingTests.cs (7)
18126N(SyntaxKind.IsExpression); 18210N(SyntaxKind.IsExpression); 18269N(SyntaxKind.IsExpression); 18324N(SyntaxKind.IsExpression); 18384N(SyntaxKind.IsExpression); 18450N(SyntaxKind.IsExpression); 18527N(SyntaxKind.IsExpression);
Parsing\DeclarationExpressionTests.cs (5)
69N(SyntaxKind.IsExpression); 105N(SyntaxKind.IsExpression); 191N(SyntaxKind.IsExpression); 298N(SyntaxKind.IsExpression); 364N(SyntaxKind.IsExpression);
Parsing\ExpressionParsingTests.cs (7)
4143N(SyntaxKind.IsExpression); 4237N(SyntaxKind.IsExpression); 4336N(SyntaxKind.IsExpression); 4441N(SyntaxKind.IsExpression); 6834N(SyntaxKind.IsExpression); 6888N(SyntaxKind.IsExpression); 6969N(SyntaxKind.IsExpression);
Parsing\FunctionPointerTests.cs (1)
2474N(SyntaxKind.IsExpression);
Parsing\LambdaAttributeParsingTests.cs (6)
1394N(SyntaxKind.IsExpression); 2216N(SyntaxKind.IsExpression); 2268N(SyntaxKind.IsExpression); 2330N(SyntaxKind.IsExpression); 2392N(SyntaxKind.IsExpression); 2459N(SyntaxKind.IsExpression);
Parsing\NameParsingTests.cs (1)
1444N(SyntaxKind.IsExpression);
Parsing\NullableParsingTests.cs (9)
338N(SyntaxKind.IsExpression); 370N(SyntaxKind.IsExpression); 406N(SyntaxKind.IsExpression); 450N(SyntaxKind.IsExpression); 1794N(SyntaxKind.IsExpression); 2046N(SyntaxKind.IsExpression); 2102N(SyntaxKind.IsExpression); 2231N(SyntaxKind.IsExpression); 2279N(SyntaxKind.IsExpression);
Parsing\PatternParsingTests.cs (21)
230N(SyntaxKind.IsExpression); 363N(SyntaxKind.IsExpression); 463N(SyntaxKind.IsExpression); 465N(SyntaxKind.IsExpression); 522N(SyntaxKind.IsExpression); 653N(SyntaxKind.IsExpression); 1131N(SyntaxKind.IsExpression); 2856N(SyntaxKind.IsExpression); 3064N(SyntaxKind.IsExpression); 3122N(SyntaxKind.IsExpression); 3314N(SyntaxKind.IsExpression); 3372N(SyntaxKind.IsExpression); 3564N(SyntaxKind.IsExpression); 3638N(SyntaxKind.IsExpression); 5684N(SyntaxKind.IsExpression); 6346N(SyntaxKind.IsExpression); 6398N(SyntaxKind.IsExpression); 6451N(SyntaxKind.IsExpression); 6504N(SyntaxKind.IsExpression); 6536N(SyntaxKind.IsExpression); 11814N(SyntaxKind.IsExpression);
Parsing\PatternParsingTests_ListPatterns.cs (2)
383N(SyntaxKind.IsExpression); 415N(SyntaxKind.IsExpression);
Parsing\PatternParsingTests2.cs (3)
962N(SyntaxKind.IsExpression); 1053N(SyntaxKind.IsExpression); 1273N(SyntaxKind.IsExpression);
Parsing\RecordParsing.cs (3)
2110N(SyntaxKind.IsExpression); 2162N(SyntaxKind.IsExpression); 2226N(SyntaxKind.IsExpression);
Parsing\StatementParsingTests.cs (2)
5863N(SyntaxKind.IsExpression); 5957N(SyntaxKind.IsExpression);
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3284=> SyntaxFactory.BinaryExpression(SyntaxKind.IsExpression, (ExpressionSyntax)Parenthesize(expression), (TypeSyntax)type);
Recommendations\CSharpRecommendationServiceRunner.cs (1)
194if (current is BinaryExpressionSyntax(SyntaxKind.IsExpression) binaryExpression &&
Simplification\Reducers\CSharpNameReducer.Rewriter.cs (1)
206var isOrAsNode = node.Kind() is SyntaxKind.AsExpression or SyntaxKind.IsExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
87if (initializerExpression.Kind() is SyntaxKind.CastExpression or SyntaxKind.IsExpression or SyntaxKind.AsExpression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
557case SyntaxKind.IsExpression: 768case SyntaxKind.IsExpression:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
102public int IsTypeExpression => (int)SyntaxKind.IsExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
483if (castNode.WalkUpParentheses().Parent is BinaryExpressionSyntax(SyntaxKind.IsExpression) isExpression &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
673if (binaryExpression.Kind() is SyntaxKind.AsExpression or SyntaxKind.IsExpression &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
3018token.Parent?.Parent is BinaryExpressionSyntax(SyntaxKind.IsExpression) binaryExpression &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
100kind: SyntaxKind.IsExpression,