153 references to System_IntPtr
Microsoft.CodeAnalysis (21)
ConstantValue.cs (2)
444case SpecialType.System_IntPtr: return ConstantValueTypeDiscriminator.NInt; 496case ConstantValueTypeDiscriminator.NInt: return SpecialType.System_IntPtr;
MetadataReader\MetadataTypeCodeExtensions.cs (2)
64return SpecialType.System_IntPtr; 118case SpecialType.System_IntPtr:
SpecialMembers.cs (12)
866(byte)SpecialType.System_IntPtr, // DeclaringTypeId 870(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 874(byte)SpecialType.System_IntPtr, // DeclaringTypeId 878(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 882(byte)SpecialType.System_IntPtr, // DeclaringTypeId 886(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 890(byte)SpecialType.System_IntPtr, // DeclaringTypeId 893(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 898(byte)SpecialType.System_IntPtr, // DeclaringTypeId 901(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 906(byte)SpecialType.System_IntPtr, // DeclaringTypeId 909(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr,
SpecialTypeExtensions.cs (3)
29case SpecialType.System_IntPtr: 80case SpecialType.System_IntPtr: 153case SpecialType.System_IntPtr:
SpecialTypes.cs (2)
114s_typeIdToTypeCodeMap[(int)SpecialType.System_IntPtr] = Microsoft.Cci.PrimitiveTypeCode.IntPtr; 138s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.IntPtr] = SpecialType.System_IntPtr;
Microsoft.CodeAnalysis.CodeStyle (8)
ITypeSymbolExtensions.cs (3)
299case SpecialType.System_IntPtr when type.IsNativeIntegerType: 392case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 661case SpecialType.System_IntPtr:
J\s\src\Compilers\Core\Portable\SpecialTypeExtensions.cs\SpecialTypeExtensions.cs (3)
29case SpecialType.System_IntPtr: 80case SpecialType.System_IntPtr: 153case SpecialType.System_IntPtr:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SpecialTypeExtensions.cs\SpecialTypeExtensions.cs (1)
31SpecialType.System_IntPtr => PredefinedType.IntPtr,
PredefinedTypeExtensions.cs (1)
31PredefinedType.IntPtr => SpecialType.System_IntPtr,
Microsoft.CodeAnalysis.CSharp (78)
Binder\Binder_Conversions.cs (16)
1693else if (destinationType == SpecialType.System_IntPtr || destinationType == SpecialType.System_UIntPtr) 1749case SpecialType.System_IntPtr: return (int)byteValue; 1769case SpecialType.System_IntPtr: return (int)charValue; 1789case SpecialType.System_IntPtr: return (int)uint16Value; 1809case SpecialType.System_IntPtr: return (int)uint32Value; 1829case SpecialType.System_IntPtr: return (int)uint64Value; 1849case SpecialType.System_IntPtr: return (int)nuintValue; 1868case SpecialType.System_IntPtr: return (int)sbyteValue; 1888case SpecialType.System_IntPtr: return (int)int16Value; 1908case SpecialType.System_IntPtr: return (int)int32Value; 1928case SpecialType.System_IntPtr: return (int)int64Value; 1948case SpecialType.System_IntPtr: return (int)nintValue; 1972case SpecialType.System_IntPtr: return (int)doubleValue; 1992case SpecialType.System_IntPtr: return (int)decimalValue; 2045case SpecialType.System_IntPtr: 2073case SpecialType.System_IntPtr:
Binder\Binder_Crefs.cs (1)
373builder.Add(this.GetSpecialType(memberName == "nint" ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr, diagnostics, syntax).AsNativeInteger());
Binder\Binder_Patterns.cs (1)
1701SpecialType.System_IntPtr when type.IsNativeIntegerType => BinaryOperatorKind.NInt,
Binder\Binder_Symbols.cs (1)
992node.IsNint ? SpecialType.System_IntPtr :
Binder\DecisionDagBuilder.cs (10)
1523case (SpecialType.System_IntPtr, SpecialType.System_UIntPtr): 1524case (SpecialType.System_UIntPtr, SpecialType.System_IntPtr): 1529case (SpecialType.System_Int32, SpecialType.System_IntPtr): 1531case (SpecialType.System_UInt32, SpecialType.System_IntPtr): 1533case (SpecialType.System_IntPtr, SpecialType.System_Int32): 1534case (SpecialType.System_IntPtr, SpecialType.System_UInt32): 1541case (SpecialType.System_Int64, SpecialType.System_IntPtr): 1543case (SpecialType.System_UInt64, SpecialType.System_IntPtr): 1545case (SpecialType.System_IntPtr, SpecialType.System_Int64): 1546case (SpecialType.System_IntPtr, SpecialType.System_UInt64):
Binder\PatternExplainer.cs (2)
674if (underlyingType.SpecialType == SpecialType.System_IntPtr) 730case SpecialType.System_IntPtr when type.IsNativeIntegerType:
Binder\Semantics\Conversions\ConversionsBase.cs (4)
1302case SpecialType.System_IntPtr when destination.IsNativeIntegerType: 1966case SpecialType.System_IntPtr when type.IsNativeIntegerType: 2057(type.SpecialType == SpecialType.System_IntPtr || type.SpecialType == SpecialType.System_UIntPtr) && !type.IsNativeIntegerType; 3696case SpecialType.System_IntPtr:
Binder\Semantics\Operators\OperatorFacts.cs (1)
45case SpecialType.System_IntPtr when type.IsNativeIntegerType:
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3044case SpecialType.System_IntPtr when type.IsNativeIntegerType:
CodeGen\EmitConversion.cs (1)
386if (p1t == SpecialType.System_IntPtr || p1t == SpecialType.System_UIntPtr)
CodeGen\EmitExpression.cs (2)
1316case SpecialType.System_IntPtr: 3230else if (type.SpecialType == SpecialType.System_IntPtr)
CodeGen\EmitStatement.cs (1)
1776? _module.GetSpecialType(SpecialType.System_IntPtr, syntaxNode, _diagnostics.DiagnosticBag)
Compilation\CSharpCompilation.cs (1)
3819return GetSpecialType(signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr).AsNativeInteger();
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
790case SpecialType.System_IntPtr:
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (7)
2126Debug.Assert(leftType.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr); 2263destinationType = SpecialType.System_IntPtr; 2279destinationType = SpecialType.System_IntPtr; 2301TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2316TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2329TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2386_factory.SpecialType(SpecialType.System_IntPtr),
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (6)
1393if (t0Type == SpecialType.System_IntPtr) 1443else if (s0Type == SpecialType.System_IntPtr) 1550case SpecialType.System_IntPtr: 1552operand = RewriteDecimalConversionCore(syntax, operand, fromType, get64BitType(_compilation, signed: toType.SpecialType == SpecialType.System_IntPtr), isImplicit, constantValueOpt); 1560case SpecialType.System_IntPtr: 1562operand = MakeConversionNode(operand, get64BitType(_compilation, signed: fromType.SpecialType == SpecialType.System_IntPtr), @checked);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
924specialType = SpecialType.System_IntPtr;
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
643case SpecialType.System_IntPtr when symbol.IsNativeIntegerType:
Symbols\AnonymousTypes\AnonymousTypeManager.SymbolCollection.cs (1)
136get { return Compilation.GetSpecialType(SpecialType.System_IntPtr); }
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (2)
177Compilation.GetSpecialType(SpecialType.System_IntPtr), 468Compilation.GetSpecialType(SpecialType.System_IntPtr),
Symbols\BaseTypeAnalysis.cs (1)
269case SpecialType.System_IntPtr:
Symbols\Compilation_WellKnownMembers.cs (1)
1023case SpecialType.System_IntPtr:
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
115case SpecialType.System_IntPtr:
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2493Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr);
Symbols\MetadataOrSourceAssemblySymbol.cs (1)
144SpecialType.System_IntPtr => 0,
Symbols\MissingMetadataTypeSymbol.cs (1)
346Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr);
Symbols\NativeIntegerTypeSymbol.cs (2)
33Debug.Assert(underlyingType.SpecialType == SpecialType.System_IntPtr || underlyingType.SpecialType == SpecialType.System_UIntPtr); 288Debug.Assert(_specialType == SpecialType.System_IntPtr || _specialType == SpecialType.System_UIntPtr);
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
59var intPtrType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax));
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1644Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr);
Symbols\SpecialTypeExtensions.cs (1)
48case SpecialType.System_IntPtr:
Symbols\TypeSymbol.cs (1)
557|| (SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr && this.ContainingAssembly.RuntimeSupportsNumericIntPtr);
Symbols\TypeSymbolExtensions.cs (4)
590case SpecialType.System_IntPtr when type.IsNativeIntegerType: 1349case SpecialType.System_IntPtr when type.IsNativeIntegerType: 2124case SpecialType.System_IntPtr when type.IsNativeIntegerType: return 12; 2147case SpecialType.System_IntPtr when underlyingType.IsNativeIntegerType: return 27;
Utilities\ValueSetFactory.cs (1)
50SpecialType.System_IntPtr when isNative => ForNint,
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
CastSimplifier.cs (1)
675=> type.IsSignedIntegralType() || type?.SpecialType is SpecialType.System_IntPtr;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
101else if (type.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr)
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
117syntax = SyntaxFactory.IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint");
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Emit\EmitMetadataTests.cs (1)
462Assert.Same(module.GetCorLibType(SpecialType.System_IntPtr), method4ParamTypes[6]);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Emit\NumericIntPtrTests.cs (3)
1566return type.SpecialType == (signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr); 10322Assert.Same(nintType, comp.GetSpecialType(SpecialType.System_IntPtr)); 10345Assert.Equal(SpecialType.System_IntPtr, type.SpecialType);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
Symbols\PlaceholderLocalSymbol.cs (1)
160var intPtrType = compilation.GetSpecialType(SpecialType.System_IntPtr);
Microsoft.CodeAnalysis.CSharp.Features (1)
CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
101else if (type.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\NativeIntegerTests.cs (9)
222Assert.Equal(signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr, type.SpecialType); 237Assert.Equal(signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr, type.SpecialType); 545var specialType = signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr; 742var specialType = signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr; 756var specialType = signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr; 1539verifyInterfaces(comp, (NamedTypeSymbol)comp.GetMember<MethodSymbol>("I.F1").ReturnType, SpecialType.System_IntPtr, includesIEquatable); 1660VerifyErrorType(comp.CreateNativeIntegerTypeSymbol(signed: true), SpecialType.System_IntPtr, isNativeInt: true); 1662VerifyErrorType(((Compilation)comp).CreateNativeIntegerTypeSymbol(signed: true), SpecialType.System_IntPtr, isNativeInt: true); 4816type.SpecialType == (signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr);
Utilities\ValueSetTests.cs (1)
506Assert.Same(ForNint, ForSpecialType(SpecialType.System_IntPtr, isNative: true));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\DelegateTests.cs (1)
116Assert.Equal(comp.GetSpecialType(SpecialType.System_IntPtr), ctor.Parameters[1].Type);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
CastSimplifier.cs (1)
675=> type.IsSignedIntegralType() || type?.SpecialType is SpecialType.System_IntPtr;
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
117syntax = SyntaxFactory.IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint");
Recommendations\CSharpRecommendationServiceRunner_Operators.cs (1)
55=> container.IsSpecialType() || container.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr;
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (2)
65if (specialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr && 69return SyntaxFactory.Identifier(specialType == SpecialType.System_IntPtr ? "nint" : "nuint");
Microsoft.CodeAnalysis.Features (1)
PreferFrameworkType\PreferFrameworkTypeCodeFixProvider.cs (1)
61var replacementNode = typeSymbol.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr
Microsoft.CodeAnalysis.UnitTests (1)
CorLibTypesTests.cs (1)
60Assert.Equal(SpecialType.System_IntPtr, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.IntPtr));
Microsoft.CodeAnalysis.VisualBasic (6)
Analysis\FlowAnalysis\AbstractFlowPass.vb (1)
344SpecialType.System_IntPtr,
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Spilling.vb (1)
467SpecialType.System_IntPtr,
Symbols\AnonymousTypes\AnonymousType_SymbolCollection.vb (1)
148Return Compilation.GetSpecialType(SpecialType.System_IntPtr)
Symbols\Source\SourceDelegateMethodSymbol.vb (1)
84Dim intPtrType = binder.GetSpecialType(SpecialType.System_IntPtr, syntax, diagnostics)
Symbols\SpecialTypeExtensions.vb (2)
61SpecialType.System_IntPtr, 216Case SpecialType.System_IntPtr, SpecialType.System_UIntPtr
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Emit\EmitMetadata.vb (1)
525Assert.Same([Module].GetCorLibType(SpecialType.System_IntPtr), method4ParamTypes(6))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
Semantics\Conversions.vb (2)
247Dim intPtrType = c1.GetSpecialType(System_IntPtr) 1098Dim intPtrType = c1.GetSpecialType(System_IntPtr)
Semantics\NativeIntegerTests.vb (1)
51Assert.Equal(If(signed, SpecialType.System_IntPtr, SpecialType.System_UIntPtr), type.SpecialType)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Source\DelegateTests.vb (1)
252Assert.Equal(compilation.GetSpecialType(SpecialType.System_IntPtr), ctor.Parameters(1).Type)
Microsoft.CodeAnalysis.Workspaces (8)
J\s\src\Compilers\Core\Portable\SpecialTypeExtensions.cs\SpecialTypeExtensions.cs (3)
29case SpecialType.System_IntPtr: 80case SpecialType.System_IntPtr: 153case SpecialType.System_IntPtr:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs\ITypeSymbolExtensions.cs (3)
299case SpecialType.System_IntPtr when type.IsNativeIntegerType: 392case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 661case SpecialType.System_IntPtr:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SpecialTypeExtensions.cs\SpecialTypeExtensions.cs (1)
31SpecialType.System_IntPtr => PredefinedType.IntPtr,
PredefinedTypeExtensions.cs (1)
31PredefinedType.IntPtr => SpecialType.System_IntPtr,