1 implementation of LeftOperand
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5658public IOperation LeftOperand { get; }
129 references to LeftOperand
ILLink.RoslynAnalyzer (3)
DataFlow\FeatureChecksVisitor.cs (2)
110 if (GetLiteralBool (operation.LeftOperand) is bool leftBool) { 118 FeatureChecksValue leftValue = Visit (operation.LeftOperand, state);
TrimAnalysis\TrimAnalysisVisitor.cs (1)
189 MultiValue leftValue = Visit (operation.LeftOperand, argument);
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (4)
142return EvaluateBinaryOperator(symbolCache, binaryOperation.LeftOperand, binaryOperation.RightOperand, false) || 143EvaluateBinaryOperator(symbolCache, binaryOperation.RightOperand, binaryOperation.LeftOperand, false); 148return EvaluateBinaryOperator(symbolCache, binaryOperation.LeftOperand, binaryOperation.RightOperand, true) || 149EvaluateBinaryOperator(symbolCache, binaryOperation.RightOperand, binaryOperation.LeftOperand, true);
Microsoft.CodeAnalysis (16)
Operations\ControlFlowGraphBuilder.cs (14)
2171ITypeSymbolHelpers.IsBooleanType(operation.LeftOperand.Type) && 2179ITypeSymbolHelpers.IsNullableOfBoolean(operation.LeftOperand.Type) && 2186ITypeSymbolHelpers.IsObjectType(operation.LeftOperand.Type) && 2192(ITypeSymbolHelpers.IsDynamicType(operation.LeftOperand.Type) || 2210leftOperand = operation.LeftOperand; 2305IOperation left = binOp.LeftOperand; 2412IOperation left = binOp.LeftOperand; 2470IOperation left = binOp.LeftOperand; 2572IOperation left = binOp.LeftOperand; 2674VisitConditionalBranch(condition.LeftOperand, ref lazyFallThrough, stopSense); 2693SyntaxNode leftSyntax = (lazyFallThrough!.GetSingletonPredecessorOrDefault() != null ? condition.LeftOperand : condition).Syntax; 2754ITypeSymbolHelpers.IsBooleanType(binOp.LeftOperand.Type) && 2819stack.Push((skipParenthesized(binOp.LeftOperand), fallThrough, !top.jumpIfTrue)); 2828stack.Push((skipParenthesized(binOp.LeftOperand), top.dest, top.jumpIfTrue));
Operations\OperationMapBuilder.cs (2)
43if (operation.LeftOperand is IBinaryOperation nested) 49Visit(operation.LeftOperand, argument);
Microsoft.CodeAnalysis.Analyzers (8)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (4)
141if (binary.LeftOperand.HasNullConstantValue() || binary.RightOperand.HasNullConstantValue()) 146if (!IsSymbolType(binary.LeftOperand, symbolType) 153&& (IsSymbolClassType(binary.LeftOperand) || IsSymbolClassType(binary.RightOperand))) 158if (IsExplicitCastToObject(binary.LeftOperand) || IsExplicitCastToObject(binary.RightOperand))
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (2)
267binaryOperation.LeftOperand.Syntax.WithoutLeadingTrivia(), 275binaryOperation.LeftOperand.Syntax.WithoutLeadingTrivia(),
MetaAnalyzers\PreferIsKindAnalyzer.cs (2)
78var possibleInvocation = operation.LeftOperand.WalkDownConversion(); 93context.ReportDiagnostic(operation.LeftOperand.CreateDiagnostic(Rule));
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (2)
466HandlePossibleInvalidatingOperation(operation.LeftOperand); 468else if (GetNullAbstractValue(operation.LeftOperand) == NullAbstractValue.Null)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (2)
410MarkValidatedLocations(operation.LeftOperand); 412else if (GetNullAbstractValue(operation.LeftOperand) == NullAbstractValue.Null)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs (2)
226var leftValue = Visit(operation.LeftOperand, argument); 228return leftValue.MergeBinaryOperation(rightValue, operation.OperatorKind, operation.LeftOperand.Type, operation.RightOperand.Type, operation.Type);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (3)
1854var leftType = operation.LeftOperand.Type; 1855var leftConstantValueOpt = operation.LeftOperand.ConstantValue; 1889return SetValueForEqualsOrNotEqualsComparisonOperator(operation.LeftOperand, operation.RightOperand, equals, isReferenceEquality, targetAnalysisData);
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (3)
56topBinary.LeftOperand is IBinaryOperation leftBinary && 57IsLocalReference(leftBinary.LeftOperand, _hashCodeVariable) && 97TryGetFieldOrProperty(binary.LeftOperand, out _))
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
72operation.LeftOperand,
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (2)
166if (binaryOperation.LeftOperand.ConstantValue is { HasValue: true, Value: null }) 172yield return binaryOperation.LeftOperand;
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (2)
224if (IsNull(binaryOperator.LeftOperand)) 233binaryOperator.LeftOperand, out localOrParameter);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
416var leftOperand = RemoveImplicitConversion(binaryOperation.LeftOperand);
Microsoft.CodeAnalysis.CSharp.CodeStyle (14)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
192!IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.LeftOperand))
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (4)
188if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand)) 204if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand)) 251startOperation, subtraction.LeftOperand); 258IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand))
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (6)
76var leftPattern = ParsePattern(op.LeftOperand); 89return (op.LeftOperand, op.RightOperand) switch 101ConstantResult.Left when op.LeftOperand.Syntax is ExpressionSyntax left 107=> new Relational(op.OperatorKind, right, op.LeftOperand), 116ConstantResult.Left when op.LeftOperand.Syntax is ExpressionSyntax left 119=> new Constant(right, op.LeftOperand),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
954if (binaryOperation.LeftOperand.Type?.SpecialType == SpecialType.System_Object && 956!IsConstantNull(binaryOperation.LeftOperand) && 964ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.LeftOperand))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (8)
159LeftOperand: IOperation leftOperand, 670AreConditionsSatisfiedEitherOrder(binOp.LeftOperand, binOp.RightOperand, 739=> TryAddEqualizedFieldsForCondition(andOp.LeftOperand, successRequirement, currentObject, otherObject, builder) && 746=> TryAddEqualizedFieldsForCondition(orOp.LeftOperand, successRequirement, currentObject, otherObject, builder) && 753LeftOperand: IMemberReferenceOperation leftMemberReference, 761LeftOperand: IMemberReferenceOperation leftMemberReference, 805LeftOperand: IOperation leftOperation, 817LeftOperand: IOperation leftOperation,
Microsoft.CodeAnalysis.CSharp.Features (22)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
192!IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.LeftOperand))
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (4)
188if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand)) 204if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand)) 251startOperation, subtraction.LeftOperand); 258IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand))
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (6)
76var leftPattern = ParsePattern(op.LeftOperand); 89return (op.LeftOperand, op.RightOperand) switch 101ConstantResult.Left when op.LeftOperand.Syntax is ExpressionSyntax left 107=> new Relational(op.OperatorKind, right, op.LeftOperand), 116ConstantResult.Left when op.LeftOperand.Syntax is ExpressionSyntax left 119=> new Constant(right, op.LeftOperand),
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (8)
159LeftOperand: IOperation leftOperand, 670AreConditionsSatisfiedEitherOrder(binOp.LeftOperand, binOp.RightOperand, 739=> TryAddEqualizedFieldsForCondition(andOp.LeftOperand, successRequirement, currentObject, otherObject, builder) && 746=> TryAddEqualizedFieldsForCondition(orOp.LeftOperand, successRequirement, currentObject, otherObject, builder) && 753LeftOperand: IMemberReferenceOperation leftMemberReference, 761LeftOperand: IMemberReferenceOperation leftMemberReference, 805LeftOperand: IOperation leftOperation, 817LeftOperand: IOperation leftOperation,
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (3)
157IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.LeftOperand)) 171IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.LeftOperand)) 275IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.LeftOperand))
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
954if (binaryOperation.LeftOperand.Type?.SpecialType == SpecialType.System_Object && 956!IsConstantNull(binaryOperation.LeftOperand) && 964ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.LeftOperand))
Microsoft.CodeAnalysis.Features (22)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (12)
209if (!ParseSwitchLabels(op.LeftOperand, labels)) 255return (op.LeftOperand, op.RightOperand) switch 287ConstantResult.Left when op.LeftOperand.Syntax is TExpressionSyntax left 307var leftPattern = ParsePattern(op.LeftOperand, guards); 350ConstantResult.Left when op.LeftOperand.Syntax is TExpressionSyntax left 377{ LeftOperand: IBinaryOperation left, RightOperand: IBinaryOperation right }) 400LessThanOrEqual when IsConstant(op.LeftOperand) => (BoundKind.Lower, op.RightOperand, op.LeftOperand), 402LessThanOrEqual when IsConstant(op.RightOperand) => (BoundKind.Higher, op.LeftOperand, op.RightOperand), 404GreaterThanOrEqual when IsConstant(op.LeftOperand) => (BoundKind.Higher, op.RightOperand, op.LeftOperand), 406GreaterThanOrEqual when IsConstant(op.RightOperand) => (BoundKind.Lower, op.LeftOperand, op.RightOperand),
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (2)
230if (IsNullCheck(binaryOperator.LeftOperand, binaryOperator.RightOperand, parameter) || 231IsNullCheck(binaryOperator.RightOperand, binaryOperator.LeftOperand, parameter))
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (3)
56topBinary.LeftOperand is IBinaryOperation leftBinary && 57IsLocalReference(leftBinary.LeftOperand, _hashCodeVariable) && 97TryGetFieldOrProperty(binary.LeftOperand, out _))
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
72operation.LeftOperand,
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (2)
166if (binaryOperation.LeftOperand.ConstantValue is { HasValue: true, Value: null }) 172yield return binaryOperation.LeftOperand;
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (2)
224if (IsNull(binaryOperator.LeftOperand)) 233binaryOperator.LeftOperand, out localOrParameter);
Microsoft.CodeAnalysis.Test.Utilities (8)
Compilation\ControlFlowGraphVerifier.cs (2)
946if (binOp.LeftOperand == reference && 950(ITypeSymbolHelpers.IsDynamicType(binOp.LeftOperand.Type) || ITypeSymbolHelpers.IsDynamicType(binOp.RightOperand.Type)))))
Compilation\OperationTreeVerifier.cs (1)
1211Visit(operation.LeftOperand, "Left");
Compilation\TestOperationVisitor.cs (1)
790AssertEx.Equal(new[] { operation.LeftOperand, operation.RightOperand }, operation.ChildOperations);
Diagnostics\OperationTestAnalyzer.cs (4)
155IOperation conditionLeft = condition.LeftOperand; 247advanceOperation.LeftOperand.Kind == OperationKind.LocalReference && 248((ILocalReferenceOperation)advanceOperation.LeftOperand).Local == testVariable && 1609var left = binary.LeftOperand;
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
416var leftOperand = RemoveImplicitConversion(binaryOperation.LeftOperand);
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (2)
IOperation\IOperationTests.vb (2)
69Dim left1 As IOperation = add1.LeftOperand 103Dim left2 As IOperation = add2.LeftOperand