37 references to WalkUpParentheses
Microsoft.CodeAnalysis.CSharp.CodeStyle (37)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (1)
97
var convertedType = semanticModel.GetTypeInfo(expression.
WalkUpParentheses
(), cancellationToken).ConvertedType;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (3)
78
var topMostExpression = expression.
WalkUpParentheses
();
603
var topExpression = expression.
WalkUpParentheses
();
867
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)
131
return node.
WalkUpParentheses
().Parent switch
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
234
expression = expression.
WalkUpParentheses
();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
428
var topExpression = expression.
WalkUpParentheses
();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (29)
56
!cast.
WalkUpParentheses
().ContainsDiagnostics &&
63
if (cast.
WalkUpParentheses
().ContainsDiagnostics)
117
var leftOrRightChild = castExpression.
WalkUpParentheses
();
152
if (castExpression.
WalkUpParentheses
().Parent is PrefixUnaryExpressionSyntax(SyntaxKind.BitwiseNotExpression) parent &&
153
parent.
WalkUpParentheses
().Parent is CastExpressionSyntax parentCast)
176
Contract.ThrowIfTrue(castNode.
WalkUpParentheses
().ContainsDiagnostics);
185
if (isDefaultLiteralCast && castNode.
WalkUpParentheses
().Parent is PatternSyntax or CaseSwitchLabelSyntax)
223
if (castSyntax.
WalkUpParentheses
().GetRequiredParent().Kind() is SyntaxKind.BitwiseOrExpression or SyntaxKind.OrAssignmentExpression)
307
var originalConvertedType = originalSemanticModel.GetTypeInfo(castNode.
WalkUpParentheses
(), cancellationToken).ConvertedType;
436
if (castNode.
WalkUpParentheses
().Parent is MemberAccessExpressionSyntax memberAccessExpression)
464
if (castNode.
WalkUpParentheses
().Parent is InvocationExpressionSyntax invocationExpression)
483
if (castNode.
WalkUpParentheses
().Parent is BinaryExpressionSyntax(SyntaxKind.IsExpression) isExpression &&
675
if (castNode.
WalkUpParentheses
().Parent is not MemberAccessExpressionSyntax { Parent: InvocationExpressionSyntax } memberAccessExpression)
748
var parent = castNode.
WalkUpParentheses
().GetRequiredParent();
753
var rewrittenBitwiseNotExpression = (PrefixUnaryExpressionSyntax)rewrittenExpression.
WalkUpParentheses
().GetRequiredParent();
793
var parent = castExpression.
WalkUpParentheses
();
798
var rewrittenConditionalExpression = (ConditionalExpressionSyntax)rewrittenExpression.
WalkUpParentheses
().GetRequiredParent();
872
var parentBinary = expression.
WalkUpParentheses
().GetRequiredParent() as BinaryExpressionSyntax;
969
var parent = castOrAsNode.
WalkUpParentheses
();
1039
castNode = castNode.
WalkUpParentheses
();
1094
for (SyntaxNode? currentOld = castNode.
WalkUpParentheses
().Parent, currentNew = rewrittenExpression.
WalkUpParentheses
().Parent;
1150
for (SyntaxNode? currentOld = castNode.
WalkUpParentheses
().Parent, currentNew = rewrittenExpression.
WalkUpParentheses
().Parent;
1180
for (SyntaxNode? currentOld = castNode.
WalkUpParentheses
().Parent, currentNew = rewrittenExpression.
WalkUpParentheses
().Parent;
1217
var rewrittenMemberAccessExpression = (MemberAccessExpressionSyntax)rewrittenExpression.
WalkUpParentheses
().GetRequiredParent();
1326
var rewrittenMemberAccessExpression = (InvocationExpressionSyntax)rewrittenExpression.
WalkUpParentheses
().GetRequiredParent();
1456
if (castNode.
WalkUpParentheses
().Parent is InterpolationSyntax)