38 references to WalkUpParentheses
Microsoft.CodeAnalysis.CSharp.CodeStyle (38)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (1)
97
var convertedType = semanticModel.GetTypeInfo(expression.
WalkUpParentheses
(), cancellationToken).ConvertedType;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
93
var topMostExpression = expression.
WalkUpParentheses
();
783
if (expression.
WalkUpParentheses
().Parent is not EqualsValueClauseSyntax
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
266
var nodeToCheck = identifierName.
WalkUpParentheses
();
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
126
return node.
WalkUpParentheses
().Parent switch
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
235
expression = expression.
WalkUpParentheses
();
912
var topExpression = expression.
WalkUpParentheses
();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
432
var topExpression = expression.
WalkUpParentheses
();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (30)
56
!cast.
WalkUpParentheses
().ContainsDiagnostics &&
63
if (cast.
WalkUpParentheses
().ContainsDiagnostics)
124
var leftOrRightChild = castExpression.
WalkUpParentheses
();
159
if (castExpression.
WalkUpParentheses
().Parent is PrefixUnaryExpressionSyntax(SyntaxKind.BitwiseNotExpression) parent &&
160
parent.
WalkUpParentheses
().Parent is CastExpressionSyntax parentCast)
183
Contract.ThrowIfTrue(castNode.
WalkUpParentheses
().ContainsDiagnostics);
192
if (isDefaultLiteralCast && castNode.
WalkUpParentheses
().Parent is PatternSyntax or CaseSwitchLabelSyntax)
230
if (castSyntax.
WalkUpParentheses
().GetRequiredParent().Kind() is SyntaxKind.BitwiseOrExpression or SyntaxKind.OrAssignmentExpression)
314
var originalConvertedType = originalSemanticModel.GetTypeInfo(castNode.
WalkUpParentheses
(), cancellationToken).ConvertedType;
364
if (rewrittenConversion.IsExplicit && castNode.
WalkUpParentheses
().Parent is not InterpolationSyntax)
451
if (castNode.
WalkUpParentheses
().Parent is MemberAccessExpressionSyntax memberAccessExpression)
484
if (castNode.
WalkUpParentheses
().Parent is InvocationExpressionSyntax invocationExpression)
503
if (castNode.
WalkUpParentheses
().Parent is BinaryExpressionSyntax(SyntaxKind.IsExpression) isExpression &&
713
if (castNode.
WalkUpParentheses
().Parent is not MemberAccessExpressionSyntax { Parent: InvocationExpressionSyntax } memberAccessExpression)
786
var parent = castNode.
WalkUpParentheses
().GetRequiredParent();
791
var rewrittenBitwiseNotExpression = (PrefixUnaryExpressionSyntax)rewrittenExpression.
WalkUpParentheses
().GetRequiredParent();
831
var parent = castExpression.
WalkUpParentheses
();
836
var rewrittenConditionalExpression = (ConditionalExpressionSyntax)rewrittenExpression.
WalkUpParentheses
().GetRequiredParent();
910
var parentBinary = expression.
WalkUpParentheses
().GetRequiredParent() as BinaryExpressionSyntax;
1007
var parent = castOrAsNode.
WalkUpParentheses
();
1077
castNode = castNode.
WalkUpParentheses
();
1132
for (SyntaxNode? currentOld = castNode.
WalkUpParentheses
().Parent, currentNew = rewrittenExpression.
WalkUpParentheses
().Parent;
1188
for (SyntaxNode? currentOld = castNode.
WalkUpParentheses
().Parent, currentNew = rewrittenExpression.
WalkUpParentheses
().Parent;
1218
for (SyntaxNode? currentOld = castNode.
WalkUpParentheses
().Parent, currentNew = rewrittenExpression.
WalkUpParentheses
().Parent;
1255
var rewrittenMemberAccessExpression = (MemberAccessExpressionSyntax)rewrittenExpression.
WalkUpParentheses
().GetRequiredParent();
1364
var rewrittenMemberAccessExpression = (InvocationExpressionSyntax)rewrittenExpression.
WalkUpParentheses
().GetRequiredParent();
1494
if (castNode.
WalkUpParentheses
().Parent is InterpolationSyntax)