1 implementation of LeftOperand
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5658
public IOperation
LeftOperand
{ get; }
140 references to LeftOperand
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
416
var leftOperand = RemoveImplicitConversion(binaryOperation.
LeftOperand
);
ILLink.RoslynAnalyzer (3)
DataFlow\FeatureChecksVisitor.cs (2)
112
if (GetLiteralBool(operation.
LeftOperand
) is bool leftBool)
122
FeatureChecksValue leftValue = Visit(operation.
LeftOperand
, state);
TrimAnalysis\TrimAnalysisVisitor.cs (1)
197
MultiValue leftValue = Visit(operation.
LeftOperand
, argument);
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (4)
142
return EvaluateBinaryOperator(symbolCache, binaryOperation.
LeftOperand
, binaryOperation.RightOperand, false) ||
143
EvaluateBinaryOperator(symbolCache, binaryOperation.RightOperand, binaryOperation.
LeftOperand
, false);
148
return EvaluateBinaryOperator(symbolCache, binaryOperation.
LeftOperand
, binaryOperation.RightOperand, true) ||
149
EvaluateBinaryOperator(symbolCache, binaryOperation.RightOperand, binaryOperation.
LeftOperand
, true);
Microsoft.CodeAnalysis (16)
Operations\ControlFlowGraphBuilder.cs (14)
2171
ITypeSymbolHelpers.IsBooleanType(operation.
LeftOperand
.Type) &&
2179
ITypeSymbolHelpers.IsNullableOfBoolean(operation.
LeftOperand
.Type) &&
2186
ITypeSymbolHelpers.IsObjectType(operation.
LeftOperand
.Type) &&
2192
(ITypeSymbolHelpers.IsDynamicType(operation.
LeftOperand
.Type) ||
2210
leftOperand = operation.
LeftOperand
;
2305
IOperation left = binOp.
LeftOperand
;
2412
IOperation left = binOp.
LeftOperand
;
2470
IOperation left = binOp.
LeftOperand
;
2572
IOperation left = binOp.
LeftOperand
;
2674
VisitConditionalBranch(condition.
LeftOperand
, ref lazyFallThrough, stopSense);
2693
SyntaxNode leftSyntax = (lazyFallThrough!.GetSingletonPredecessorOrDefault() != null ? condition.
LeftOperand
: condition).Syntax;
2754
ITypeSymbolHelpers.IsBooleanType(binOp.
LeftOperand
.Type) &&
2819
stack.Push((skipParenthesized(binOp.
LeftOperand
), fallThrough, !top.jumpIfTrue));
2828
stack.Push((skipParenthesized(binOp.
LeftOperand
), top.dest, top.jumpIfTrue));
Operations\OperationMapBuilder.cs (2)
43
if (operation.
LeftOperand
is IBinaryOperation nested)
49
Visit(operation.
LeftOperand
, argument);
Microsoft.CodeAnalysis.Analyzers (9)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (4)
141
if (binary.
LeftOperand
.HasNullConstantValue() || binary.RightOperand.HasNullConstantValue())
146
if (!IsSymbolType(binary.
LeftOperand
, symbolType)
153
&& (IsSymbolClassType(binary.
LeftOperand
) || IsSymbolClassType(binary.RightOperand)))
158
if (IsExplicitCastToObject(binary.
LeftOperand
) || IsExplicitCastToObject(binary.RightOperand))
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (2)
268
binaryOperation.
LeftOperand
.Syntax.WithoutLeadingTrivia(),
276
binaryOperation.
LeftOperand
.Syntax.WithoutLeadingTrivia(),
MetaAnalyzers\PreferIsKindAnalyzer.cs (2)
78
var possibleInvocation = operation.
LeftOperand
.WalkDownConversion();
93
context.ReportDiagnostic(operation.
LeftOperand
.CreateDiagnostic(Rule));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
416
var leftOperand = RemoveImplicitConversion(binaryOperation.
LeftOperand
);
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (2)
468
HandlePossibleInvalidatingOperation(operation.
LeftOperand
);
470
else if (GetNullAbstractValue(operation.
LeftOperand
) == NullAbstractValue.Null)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (2)
411
MarkValidatedLocations(operation.
LeftOperand
);
413
else if (GetNullAbstractValue(operation.
LeftOperand
) == NullAbstractValue.Null)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs (2)
226
var leftValue = Visit(operation.
LeftOperand
, argument);
228
return leftValue.MergeBinaryOperation(rightValue, operation.OperatorKind, operation.
LeftOperand
.Type, operation.RightOperand.Type, operation.Type);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (3)
1856
var leftType = operation.
LeftOperand
.Type;
1857
var leftConstantValueOpt = operation.
LeftOperand
.ConstantValue;
1891
return SetValueForEqualsOrNotEqualsComparisonOperator(operation.
LeftOperand
, operation.RightOperand, equals, isReferenceEquality, targetAnalysisData);
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
416
var leftOperand = RemoveImplicitConversion(binaryOperation.
LeftOperand
);
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (3)
56
topBinary.
LeftOperand
is IBinaryOperation leftBinary &&
57
IsLocalReference(leftBinary.
LeftOperand
, _hashCodeVariable) &&
97
TryGetFieldOrProperty(binary.
LeftOperand
, out _))
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
72
operation.
LeftOperand
,
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (2)
165
if (binaryOperation.
LeftOperand
.ConstantValue is { HasValue: true, Value: null })
171
yield return binaryOperation.
LeftOperand
;
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (2)
224
if (IsNull(binaryOperator.
LeftOperand
))
233
binaryOperator.
LeftOperand
, out localOrParameter);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
416
var 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)
188
if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.
LeftOperand
))
204
if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.
LeftOperand
))
251
startOperation, subtraction.
LeftOperand
);
258
IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.
LeftOperand
))
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (6)
76
var leftPattern = ParsePattern(op.
LeftOperand
);
89
return (op.
LeftOperand
, op.RightOperand) switch
101
ConstantResult.Left when op.
LeftOperand
.Syntax is ExpressionSyntax left
107
=> new Relational(op.OperatorKind, right, op.
LeftOperand
),
116
ConstantResult.Left when op.
LeftOperand
.Syntax is ExpressionSyntax left
119
=> new Constant(right, op.
LeftOperand
),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
1051
if (binaryOperation.
LeftOperand
.Type?.SpecialType == SpecialType.System_Object &&
1053
!IsConstantNull(binaryOperation.
LeftOperand
) &&
1061
ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.
LeftOperand
))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (8)
159
LeftOperand
: IOperation leftOperand,
670
AreConditionsSatisfiedEitherOrder(binOp.
LeftOperand
, binOp.RightOperand,
739
=> TryAddEqualizedFieldsForCondition(andOp.
LeftOperand
, successRequirement, currentObject, otherObject, builder) &&
746
=> TryAddEqualizedFieldsForCondition(orOp.
LeftOperand
, successRequirement, currentObject, otherObject, builder) &&
753
LeftOperand
: IMemberReferenceOperation leftMemberReference,
761
LeftOperand
: IMemberReferenceOperation leftMemberReference,
805
LeftOperand
: IOperation leftOperation,
817
LeftOperand
: IOperation leftOperation,
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (3)
157
IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.
LeftOperand
))
171
IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.
LeftOperand
))
275
IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.
LeftOperand
))
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)
188
if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.
LeftOperand
))
204
if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.
LeftOperand
))
251
startOperation, subtraction.
LeftOperand
);
258
IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.
LeftOperand
))
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (6)
76
var leftPattern = ParsePattern(op.
LeftOperand
);
89
return (op.
LeftOperand
, op.RightOperand) switch
101
ConstantResult.Left when op.
LeftOperand
.Syntax is ExpressionSyntax left
107
=> new Relational(op.OperatorKind, right, op.
LeftOperand
),
116
ConstantResult.Left when op.
LeftOperand
.Syntax is ExpressionSyntax left
119
=> new Constant(right, op.
LeftOperand
),
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (8)
159
LeftOperand
: IOperation leftOperand,
670
AreConditionsSatisfiedEitherOrder(binOp.
LeftOperand
, binOp.RightOperand,
739
=> TryAddEqualizedFieldsForCondition(andOp.
LeftOperand
, successRequirement, currentObject, otherObject, builder) &&
746
=> TryAddEqualizedFieldsForCondition(orOp.
LeftOperand
, successRequirement, currentObject, otherObject, builder) &&
753
LeftOperand
: IMemberReferenceOperation leftMemberReference,
761
LeftOperand
: IMemberReferenceOperation leftMemberReference,
805
LeftOperand
: IOperation leftOperation,
817
LeftOperand
: IOperation leftOperation,
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (3)
157
IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.
LeftOperand
))
171
IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.
LeftOperand
))
275
IsInstanceLengthCheck(lengthLikeProperty, instance, subtraction.
LeftOperand
))
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
1051
if (binaryOperation.
LeftOperand
.Type?.SpecialType == SpecialType.System_Object &&
1053
!IsConstantNull(binaryOperation.
LeftOperand
) &&
1061
ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.
LeftOperand
))
Microsoft.CodeAnalysis.Features (23)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (12)
210
if (!ParseSwitchLabels(op.
LeftOperand
, labels))
256
return (op.
LeftOperand
, op.RightOperand) switch
288
ConstantResult.Left when op.
LeftOperand
.Syntax is TExpressionSyntax left
308
var leftPattern = ParsePattern(op.
LeftOperand
, guards);
351
ConstantResult.Left when op.
LeftOperand
.Syntax is TExpressionSyntax left
378
{
LeftOperand
: IBinaryOperation left, RightOperand: IBinaryOperation right })
401
LessThanOrEqual when IsConstant(op.
LeftOperand
) => (BoundKind.Lower, op.RightOperand, op.
LeftOperand
),
403
LessThanOrEqual when IsConstant(op.RightOperand) => (BoundKind.Higher, op.
LeftOperand
, op.RightOperand),
405
GreaterThanOrEqual when IsConstant(op.
LeftOperand
) => (BoundKind.Higher, op.RightOperand, op.
LeftOperand
),
407
GreaterThanOrEqual when IsConstant(op.RightOperand) => (BoundKind.Lower, op.
LeftOperand
, op.RightOperand),
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (3)
270
if (IsNullCheck(binaryOperator.
LeftOperand
, binaryOperator.RightOperand, parameter) ||
271
IsNullCheck(binaryOperator.RightOperand, binaryOperator.
LeftOperand
, parameter))
308
IsNumericCheckOperands(binaryOperator.
LeftOperand
, binaryOperator.RightOperand, parameter))
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (3)
56
topBinary.
LeftOperand
is IBinaryOperation leftBinary &&
57
IsLocalReference(leftBinary.
LeftOperand
, _hashCodeVariable) &&
97
TryGetFieldOrProperty(binary.
LeftOperand
, out _))
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
72
operation.
LeftOperand
,
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (2)
165
if (binaryOperation.
LeftOperand
.ConstantValue is { HasValue: true, Value: null })
171
yield return binaryOperation.
LeftOperand
;
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (2)
224
if (IsNull(binaryOperator.
LeftOperand
))
233
binaryOperator.
LeftOperand
, out localOrParameter);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
416
var leftOperand = RemoveImplicitConversion(binaryOperation.
LeftOperand
);
Microsoft.CodeAnalysis.Test.Utilities (8)
Compilation\ControlFlowGraphVerifier.cs (2)
946
if (binOp.
LeftOperand
== reference &&
950
(ITypeSymbolHelpers.IsDynamicType(binOp.
LeftOperand
.Type) || ITypeSymbolHelpers.IsDynamicType(binOp.RightOperand.Type)))))
Compilation\OperationTreeVerifier.cs (1)
1193
Visit(operation.
LeftOperand
, "Left");
Compilation\TestOperationVisitor.cs (1)
791
AssertEx.Equal(new[] { operation.
LeftOperand
, operation.RightOperand }, operation.ChildOperations);
Diagnostics\OperationTestAnalyzer.cs (4)
155
IOperation conditionLeft = condition.
LeftOperand
;
247
advanceOperation.
LeftOperand
.Kind == OperationKind.LocalReference &&
248
((ILocalReferenceOperation)advanceOperation.
LeftOperand
).Local == testVariable &&
1609
var left = binary.
LeftOperand
;
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
416
var leftOperand = RemoveImplicitConversion(binaryOperation.
LeftOperand
);
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
416
var leftOperand = RemoveImplicitConversion(binaryOperation.
LeftOperand
);
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
1051
if (binaryOperation.
LeftOperand
.Type?.SpecialType == SpecialType.System_Object &&
1053
!IsConstantNull(binaryOperation.
LeftOperand
) &&
1061
ConvertedHasUserDefinedEquals(binaryOperation.OperatorKind, binaryOperation.
LeftOperand
))
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
416
var leftOperand = RemoveImplicitConversion(binaryOperation.
LeftOperand
);