49 references to UnaryOperatorKind
Microsoft.CodeAnalysis (10)
Generated\Operations.Generated.cs (3)
983UnaryOperatorKind OperatorKind { get; } 5206internal UnaryOperation(UnaryOperatorKind operatorKind, IOperation operand, bool isLifted, bool isChecked, IMethodSymbol? operatorMethod, ITypeSymbol? constrainedToType, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5218public UnaryOperatorKind OperatorKind { get; }
Operations\ControlFlowGraphBuilder.cs (7)
2246return operation.OperatorKind == UnaryOperatorKind.Not && 2383return new UnaryOperation(UnaryOperatorKind.Not, operand, isLifted: true, isChecked: false, 2484condition = new UnaryOperation(isAndAlso ? UnaryOperatorKind.False : UnaryOperatorKind.True, 2587condition = new UnaryOperation(isAndAlso ? UnaryOperatorKind.False : UnaryOperatorKind.True, 2724: new UnaryOperation(UnaryOperatorKind.Not, condition, isLifted: false, isChecked: false,
Microsoft.CodeAnalysis.CodeStyle (1)
HashCodeAnalyzer.cs (1)
234? unary.OperatorKind == UnaryOperatorKind.Minus && IsLiteralNumber(unary.Operand)
Microsoft.CodeAnalysis.CSharp (10)
Operations\CSharpOperationFactory.cs (2)
1366UnaryOperatorKind unaryOperatorKind = Helper.DeriveUnaryOperatorKind(boundUnaryOperator.OperatorKind); 2670UnaryOperatorKind.Hat,
Operations\CSharpOperationFactory_Methods.cs (8)
441internal static UnaryOperatorKind DeriveUnaryOperatorKind(CSharp.UnaryOperatorKind operatorKind) 446return UnaryOperatorKind.Plus; 449return UnaryOperatorKind.Minus; 452return UnaryOperatorKind.Not; 455return UnaryOperatorKind.BitwiseNegation; 458return UnaryOperatorKind.True; 461return UnaryOperatorKind.False; 464return UnaryOperatorKind.None;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
CastSimplifier.cs (1)
648if (rewrittenOperation is not IUnaryOperation { OperatorKind: UnaryOperatorKind.BitwiseNegation } unaryOperation)
CSharpUsePatternCombinatorsAnalyzer.cs (1)
59case IUnaryOperation { OperatorKind: UnaryOperatorKind.Not } op:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
ConvertToRecordHelpers.cs (3)
139OperatorKind: UnaryOperatorKind.Not, 733(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition }) 793(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition })
Microsoft.CodeAnalysis.CSharp.Features (4)
ConvertToRecordHelpers.cs (3)
139OperatorKind: UnaryOperatorKind.Not, 733(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition }) 793(_, IUnaryOperation { OperatorKind: UnaryOperatorKind.Not, Operand: IOperation newCondition })
CSharpUsePatternCombinatorsAnalyzer.cs (1)
59case IUnaryOperation { OperatorKind: UnaryOperatorKind.Not } op:
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CastSimplifier.cs (1)
648if (rewrittenOperation is not IUnaryOperation { OperatorKind: UnaryOperatorKind.BitwiseNegation } unaryOperation)
Microsoft.CodeAnalysis.Features (1)
HashCodeAnalyzer.cs (1)
234? unary.OperatorKind == UnaryOperatorKind.Minus && IsLiteralNumber(unary.Operand)
Microsoft.CodeAnalysis.Test.Utilities (7)
Compilation\OperationTreeVerifier.cs (1)
1159var kindStr = $"{nameof(UnaryOperatorKind)}.{operation.OperatorKind}";
Compilation\TestOperationVisitor.cs (1)
732var unaryOperationKind = operation.OperatorKind;
Diagnostics\OperationTestAnalyzer.cs (5)
1532if (unary.OperatorKind == UnaryOperatorKind.Minus && unary.OperatorMethod != null && unary.OperatorMethod.Name.Contains("UnaryNegation")) 1537if (unary.OperatorKind == UnaryOperatorKind.Not) 1542if (unary.OperatorKind == UnaryOperatorKind.BitwiseNegation) 1972if (unary.OperatorKind == UnaryOperatorKind.True) 1976else if (unary.OperatorKind == UnaryOperatorKind.False)
Microsoft.CodeAnalysis.VisualBasic (9)
Operations\VisualBasicOperationFactory.vb (2)
500Dim operatorKind As UnaryOperatorKind = Helper.DeriveUnaryOperatorKind(boundUnaryOperator.OperatorKind) 513Dim operatorKind As UnaryOperatorKind = Helper.DeriveUnaryOperatorKind(boundUserDefinedUnaryOperator.OperatorKind)
Operations\VisualBasicOperationFactory_Methods.vb (7)
616Friend Shared Function DeriveUnaryOperatorKind(operatorKind As VisualBasic.UnaryOperatorKind) As UnaryOperatorKind 619Return UnaryOperatorKind.Plus 621Return UnaryOperatorKind.Minus 623Return UnaryOperatorKind.Not 625Return UnaryOperatorKind.True 627Return UnaryOperatorKind.False 629Return UnaryOperatorKind.None
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (1)
IOperation\IOperationTests.vb (1)
133Assert.Equal(negate3.OperatorKind, Operations.UnaryOperatorKind.Minus)