226 references to UnaryOperatorKind
Microsoft.CodeAnalysis.VisualBasic (226)
Analysis\FlowAnalysis\AbstractFlowPass.vb (1)
2287If node.OperatorKind = UnaryOperatorKind.Not Then
Binding\Binder_Conversions.vb (1)
379Dim isTrue As BoundUserDefinedUnaryOperator = BindUserDefinedUnaryOperator(node, UnaryOperatorKind.IsTrue, argument, isTrueOperator, diagnostics)
Binding\Binder_Operators.vb (12)
769UnaryOperatorKind.IsFalse, 770UnaryOperatorKind.IsTrue), 1137Dim preliminaryOperatorKind As UnaryOperatorKind = OverloadResolution.MapUnaryOperatorKind(node.Kind) 1157Dim operatorKind As UnaryOperatorKind = OverloadResolution.ResolveUnaryOperator(preliminaryOperatorKind, operand, Me, intrinsicOperatorType, userDefinedOperator, useSiteInfo) 1164If operatorKind = UnaryOperatorKind.UserDefined Then 1175operatorKind = UnaryOperatorKind.Error 1178If operatorKind = UnaryOperatorKind.Error Then 1181Return New BoundUnaryOperator(node, preliminaryOperatorKind Or UnaryOperatorKind.Error, operand, CheckOverflow, ErrorTypeSymbol.UnknownResultType, HasErrors:=True) 1204Debug.Assert(((operatorKind And UnaryOperatorKind.Lifted) <> 0) = resultType.IsNullableType()) 1239opKind As UnaryOperatorKind, 1248opKind = opKind Or UnaryOperatorKind.UserDefined 1265opKind = opKind Or UnaryOperatorKind.Lifted
Binding\DocumentationCommentCrefBinder.vb (7)
903Dim opInfo As New OverloadResolution.OperatorInfo(UnaryOperatorKind.IsTrue) 909Dim opInfo As New OverloadResolution.OperatorInfo(UnaryOperatorKind.IsFalse) 915Dim opInfo As New OverloadResolution.OperatorInfo(UnaryOperatorKind.Not) 924Dim opInfo As New OverloadResolution.OperatorInfo(UnaryOperatorKind.Plus) 933Dim opInfo As New OverloadResolution.OperatorInfo(UnaryOperatorKind.Minus) 1064WellKnownMemberNames.ImplicitConversionName, New OverloadResolution.OperatorInfo(UnaryOperatorKind.Implicit), 1066WellKnownMemberNames.ExplicitConversionName, New OverloadResolution.OperatorInfo(UnaryOperatorKind.Explicit))
BoundTree\BoundUnaryOperator.vb (5)
15operatorKind As UnaryOperatorKind, 34If (OperatorKind And UnaryOperatorKind.Error) = 0 Then 35Dim op As UnaryOperatorKind = (OperatorKind And UnaryOperatorKind.OpMask) 39Dim isChecked = Checked AndAlso operandType.IsIntegralType() AndAlso op = UnaryOperatorKind.Minus
BoundTree\BoundUserDefinedUnaryOperator.vb (2)
28Debug.Assert((OperatorKind And UnaryOperatorKind.UserDefined) <> 0) 38If (OperatorKind And UnaryOperatorKind.Lifted) <> 0 Then
CodeGen\EmitConversion.vb (3)
130Select Case (DirectCast(conversion.Operand, BoundUnaryOperator).OperatorKind And UnaryOperatorKind.IntrinsicOpMask) 131Case UnaryOperatorKind.Minus, 132UnaryOperatorKind.Plus
CodeGen\EmitOperators.vb (6)
15Debug.Assert((expression.OperatorKind And Not UnaryOperatorKind.IntrinsicOpMask) = 0 AndAlso expression.OperatorKind <> 0) 23Case UnaryOperatorKind.Minus 53Case UnaryOperatorKind.Not 76Case UnaryOperatorKind.Plus 88expression.OperatorKind = UnaryOperatorKind.Minus AndAlso 689Debug.Assert(unOp.OperatorKind = UnaryOperatorKind.Not AndAlso unOp.Type.IsBooleanType())
CodeGen\EmitStatement.vb (1)
758If (unOp.OperatorKind = UnaryOperatorKind.Not) Then
CodeGen\Optimizer\StackScheduler.Analyzer.vb (2)
1001If node.Checked AndAlso (node.OperatorKind And UnaryOperatorKind.OpMask) = UnaryOperatorKind.Minus Then
Compilation\VisualBasicCompilation.vb (4)
3055opInfo.UnaryOperatorKind = UnaryOperatorKind.Not AndAlso 3064If opInfo.UnaryOperatorKind = UnaryOperatorKind.Not OrElse 3065opInfo.UnaryOperatorKind = UnaryOperatorKind.Plus OrElse 3066opInfo.UnaryOperatorKind = UnaryOperatorKind.Minus Then
Generated\BoundNodes.xml.Generated.vb (8)
1377Public Sub New(syntax As SyntaxNode, operatorKind As UnaryOperatorKind, operand As BoundExpression, checked As Boolean, constantValueOpt As ConstantValue, type As TypeSymbol, Optional hasErrors As Boolean = False) 1395Private ReadOnly _OperatorKind As UnaryOperatorKind 1396Public ReadOnly Property OperatorKind As UnaryOperatorKind 1428Public Function Update(operatorKind As UnaryOperatorKind, operand As BoundExpression, checked As Boolean, constantValueOpt As ConstantValue, type As TypeSymbol) As BoundUnaryOperator 1441Public Sub New(syntax As SyntaxNode, operatorKind As UnaryOperatorKind, underlyingExpression As BoundExpression, type As TypeSymbol, Optional hasErrors As Boolean = False) 1457Private ReadOnly _OperatorKind As UnaryOperatorKind 1458Public ReadOnly Property OperatorKind As UnaryOperatorKind 1476Public Function Update(operatorKind As UnaryOperatorKind, underlyingExpression As BoundExpression, type As TypeSymbol) As BoundUserDefinedUnaryOperator
Lowering\Diagnostics\DiagnosticsPass_ExpressionLambdas.vb (6)
34Dim opKind As UnaryOperatorKind = node.OperatorKind And UnaryOperatorKind.OpMask 35Dim isLifted As Boolean = (node.OperatorKind And UnaryOperatorKind.Lifted) <> 0 38Case UnaryOperatorKind.Minus, 39UnaryOperatorKind.Plus, 40UnaryOperatorKind.Not
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (6)
746Private Function AdjustCallForLiftedOperator(opKind As UnaryOperatorKind, [call] As BoundCall, resultType As TypeSymbol) As BoundExpression 747Debug.Assert((opKind And UnaryOperatorKind.Lifted) <> 0) 748Debug.Assert((opKind And UnaryOperatorKind.OpMask) = UnaryOperatorKind.IsTrue OrElse 749(opKind And UnaryOperatorKind.OpMask) = UnaryOperatorKind.IsFalse)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_UnaryOperator.vb (37)
31Dim opKind As UnaryOperatorKind = node.OperatorKind And UnaryOperatorKind.OpMask 34Debug.Assert((node.OperatorKind And UnaryOperatorKind.UserDefined) = 0) 37Case UnaryOperatorKind.Plus 51Case UnaryOperatorKind.Minus, 52UnaryOperatorKind.Not 65If opKind = UnaryOperatorKind.Minus Then 77If opKind = UnaryOperatorKind.Minus Then 127Dim opKind As UnaryOperatorKind = userDefinedOperator.OperatorKind 128If (opKind And UnaryOperatorKind.OpMask) <> UnaryOperatorKind.IsTrue OrElse (opKind And UnaryOperatorKind.Lifted) = 0 Then 154Private Function BuildLambdaBodyForCoalesce(opKind As UnaryOperatorKind, [call] As BoundCall, resultType As TypeSymbol, lambdaParameter As ParameterSymbol) As BoundExpression 176Dim opKind As UnaryOperatorKind = node.OperatorKind And UnaryOperatorKind.OpMask 177Dim isLifted As Boolean = (node.OperatorKind And UnaryOperatorKind.Lifted) <> 0 180Case UnaryOperatorKind.IsTrue, 181UnaryOperatorKind.IsFalse 184Case UnaryOperatorKind.Minus, 185UnaryOperatorKind.Plus, 186UnaryOperatorKind.Not 202Dim opKind As UnaryOperatorKind = node.OperatorKind 204If (opKind And UnaryOperatorKind.Lifted) = 0 Then 215Private Function GetHelperForDecimalUnaryOperation(opKind As UnaryOperatorKind) As MethodSymbol 216opKind = opKind And UnaryOperatorKind.OpMask 220Case UnaryOperatorKind.Minus, 221UnaryOperatorKind.Not 231Private Function GetHelperForObjectUnaryOperation(opKind As UnaryOperatorKind) As MethodSymbol 232opKind = opKind And UnaryOperatorKind.OpMask 236Case UnaryOperatorKind.Plus 238Case UnaryOperatorKind.Minus 240Case UnaryOperatorKind.Not 253Private Shared Function GetUnaryOperatorFactoryMethod(opKind As UnaryOperatorKind) As WellKnownMember 254Select Case (opKind And UnaryOperatorKind.OpMask) 255Case UnaryOperatorKind.Not 257Case UnaryOperatorKind.Plus 259Case UnaryOperatorKind.Minus
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.vb (5)
395If (unaryOperator.OperatorKind And UnaryOperatorKind.UserDefined) = 0 Then 396Select Case (unaryOperator.OperatorKind And UnaryOperatorKind.IntrinsicOpMask) 397Case UnaryOperatorKind.Minus, 398UnaryOperatorKind.Plus, 399UnaryOperatorKind.Not
Lowering\LocalRewriter\LocalRewriter_BinaryOperators.vb (4)
999UnaryOperatorKind.Not, 1124New BoundUnaryOperator(syntax, UnaryOperatorKind.Not, 1268UnaryOperatorKind.Not, 1354UnaryOperatorKind.Not,
Lowering\LocalRewriter\LocalRewriter_UnaryOperators.vb (13)
72If (node.OperatorKind And UnaryOperatorKind.Lifted) <> 0 Then 80If (node.OperatorKind And UnaryOperatorKind.Lifted) = 0 OrElse _inExpressionLambda Then 95Dim kind As UnaryOperatorKind = node.OperatorKind 97If Not node.HasErrors AndAlso ((kind And UnaryOperatorKind.Lifted) = 0) AndAlso (kind <> UnaryOperatorKind.Error) AndAlso Not _inExpressionLambda Then 114Dim opKind = (node.OperatorKind And UnaryOperatorKind.IntrinsicOpMask) 118If opKind = UnaryOperatorKind.Plus Then 120ElseIf opKind = UnaryOperatorKind.Minus Then 123Debug.Assert(opKind = UnaryOperatorKind.Not) 142Dim opKind = (node.OperatorKind And UnaryOperatorKind.IntrinsicOpMask) 144If opKind = UnaryOperatorKind.Plus Then 147Debug.Assert(opKind = UnaryOperatorKind.Minus) 316Dim unliftedOpKind = originalOperator.OperatorKind And (Not UnaryOperatorKind.Lifted)
Lowering\SyntheticBoundNodeFactory.vb (1)
1086Return New BoundUnaryOperator(expression.Syntax, UnaryOperatorKind.Not, expression, False, expression.Type)
Operations\VisualBasicOperationFactory.vb (2)
505Dim isLifted As Boolean = (boundUnaryOperator.OperatorKind And VisualBasic.UnaryOperatorKind.Lifted) <> 0 518Dim isLifted As Boolean = (boundUserDefinedUnaryOperator.OperatorKind And VisualBasic.UnaryOperatorKind.Lifted) <> 0
Operations\VisualBasicOperationFactory_Methods.vb (7)
616Friend Shared Function DeriveUnaryOperatorKind(operatorKind As VisualBasic.UnaryOperatorKind) As UnaryOperatorKind 617Select Case operatorKind And VisualBasic.UnaryOperatorKind.OpMask 618Case VisualBasic.UnaryOperatorKind.Plus 620Case VisualBasic.UnaryOperatorKind.Minus 622Case VisualBasic.UnaryOperatorKind.Not 624Case VisualBasic.UnaryOperatorKind.IsTrue 626Case VisualBasic.UnaryOperatorKind.IsFalse
Semantics\Operators.vb (83)
31Public Sub New(op As UnaryOperatorKind) 57Public ReadOnly Property UnaryOperatorKind As UnaryOperatorKind 60Return UnaryOperatorKind.Error 63Return CType(_Id >> 2, UnaryOperatorKind) 91operators.Add(WellKnownMemberNames.OnesComplementOperatorName, New OperatorInfo(UnaryOperatorKind.Not)) 92operators.Add(WellKnownMemberNames.TrueOperatorName, New OperatorInfo(UnaryOperatorKind.IsTrue)) 93operators.Add(WellKnownMemberNames.FalseOperatorName, New OperatorInfo(UnaryOperatorKind.IsFalse)) 94operators.Add(WellKnownMemberNames.UnaryPlusOperatorName, New OperatorInfo(UnaryOperatorKind.Plus)) 96operators.Add(WellKnownMemberNames.UnaryNegationOperatorName, New OperatorInfo(UnaryOperatorKind.Minus)) 116operators.Add(WellKnownMemberNames.ImplicitConversionName, New OperatorInfo(UnaryOperatorKind.Implicit)) 117operators.Add(WellKnownMemberNames.ExplicitConversionName, New OperatorInfo(UnaryOperatorKind.Explicit)) 120operators.Add(WellKnownMemberNames.LogicalNotOperatorName, New OperatorInfo(UnaryOperatorKind.Not)) 142Friend Shared Function GetOperatorTokenKind(op As UnaryOperatorKind) As SyntaxKind 144Case UnaryOperatorKind.IsFalse 146Case UnaryOperatorKind.IsTrue 148Case UnaryOperatorKind.Minus 150Case UnaryOperatorKind.Not 152Case UnaryOperatorKind.Plus 154Case UnaryOperatorKind.Implicit, UnaryOperatorKind.Explicit 270Friend Shared Function TryGetOperatorName(op As UnaryOperatorKind, isChecked As Boolean) As String 272Select Case (op And UnaryOperatorKind.OpMask) 273Case UnaryOperatorKind.Plus 275Case UnaryOperatorKind.Minus 277Case UnaryOperatorKind.Not 279Case UnaryOperatorKind.Implicit 281Case UnaryOperatorKind.Explicit 283Case UnaryOperatorKind.IsTrue 285Case UnaryOperatorKind.IsFalse 323Case UnaryOperatorKind.Implicit, UnaryOperatorKind.Explicit 334Case UnaryOperatorKind.IsTrue 341Case UnaryOperatorKind.IsFalse 477Public Shared Function MapUnaryOperatorKind(opCode As SyntaxKind) As UnaryOperatorKind 478Dim result As UnaryOperatorKind 482result = UnaryOperatorKind.Plus 484result = UnaryOperatorKind.Minus 486result = UnaryOperatorKind.Not 498opCode As UnaryOperatorKind, 504) As UnaryOperatorKind 505Debug.Assert((opCode And UnaryOperatorKind.IntrinsicOpMask) = opCode AndAlso opCode <> UnaryOperatorKind.Error) 507opCode = (opCode And UnaryOperatorKind.IntrinsicOpMask) 524Return UnaryOperatorKind.Error 539Return UnaryOperatorKind.Error 543Return UnaryOperatorKind.UserDefined 546Return UnaryOperatorKind.Error 549Dim result As UnaryOperatorKind = UnaryOperatorKind.Error 551If operandIsEnum AndAlso opCode = UnaryOperatorKind.Not AndAlso sourceType.IsIntegralType() Then 555result = UnaryOperatorKind.Not 564If result <> UnaryOperatorKind.Error AndAlso operandIsNullable Then 565result = result Or UnaryOperatorKind.Lifted 575opCode As UnaryOperatorKind, 582Case UnaryOperatorKind.Not 613Case UnaryOperatorKind.Plus 645Case UnaryOperatorKind.Minus 703op As UnaryOperatorKind, 734Select Case (op And UnaryOperatorKind.IntrinsicOpMask) 735Case UnaryOperatorKind.Plus 737Case UnaryOperatorKind.Minus 745Case UnaryOperatorKind.Not 757integerOverflow = (op And UnaryOperatorKind.IntrinsicOpMask) = UnaryOperatorKind.Minus AndAlso (integerOverflow OrElse detectedIntegerOverflow) 762Select Case (op And UnaryOperatorKind.IntrinsicOpMask) 763Case UnaryOperatorKind.Plus 765Case UnaryOperatorKind.Minus 787Select Case (op And UnaryOperatorKind.IntrinsicOpMask) 788Case UnaryOperatorKind.Plus 790Case UnaryOperatorKind.Minus 801Debug.Assert((op And UnaryOperatorKind.IntrinsicOpMask) = UnaryOperatorKind.Not) 2837WellKnownMemberNames.ImplicitConversionName, New OperatorInfo(UnaryOperatorKind.Implicit), 2838WellKnownMemberNames.ExplicitConversionName, New OperatorInfo(UnaryOperatorKind.Explicit), 2956WellKnownMemberNames.TrueOperatorName, New OperatorInfo(UnaryOperatorKind.IsTrue), 2970WellKnownMemberNames.FalseOperatorName, New OperatorInfo(UnaryOperatorKind.IsFalse), 2982opKind As UnaryOperatorKind, 2990Case UnaryOperatorKind.Not 2991Dim opInfo As New OperatorInfo(UnaryOperatorKind.Not) 2996Case UnaryOperatorKind.Minus 2998WellKnownMemberNames.UnaryNegationOperatorName, New OperatorInfo(UnaryOperatorKind.Minus), 3001Case UnaryOperatorKind.Plus 3003WellKnownMemberNames.UnaryPlusOperatorName, New OperatorInfo(UnaryOperatorKind.Minus),
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
400If (opInfo.IsUnary AndAlso opInfo.UnaryOperatorKind <> UnaryOperatorKind.Error) OrElse
Symbols\Metadata\PE\PEMethodSymbol.vb (7)
444Case UnaryOperatorKind.Implicit 446Case UnaryOperatorKind.Explicit 448Case UnaryOperatorKind.IsFalse, UnaryOperatorKind.IsTrue, UnaryOperatorKind.Minus, UnaryOperatorKind.Plus 450Case UnaryOperatorKind.Not
Symbols\Source\SourceMemberContainerTypeSymbol.vb (2)
3664Case UnaryOperatorKind.IsTrue 3666Case UnaryOperatorKind.IsFalse