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