149 references to System_IntPtr
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\KnownTypeSymbols.cs (1)
132IntPtr = Compilation.GetSpecialType(SpecialType.System_IntPtr);
Microsoft.CodeAnalysis (21)
ConstantValue.cs (2)
450case SpecialType.System_IntPtr: return ConstantValueTypeDiscriminator.NInt; 502case ConstantValueTypeDiscriminator.NInt: return SpecialType.System_IntPtr;
MetadataReader\MetadataTypeCodeExtensions.cs (2)
64return SpecialType.System_IntPtr; 118case SpecialType.System_IntPtr:
SpecialMembers.cs (12)
955(byte)SpecialType.System_IntPtr, // DeclaringTypeId 959(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 963(byte)SpecialType.System_IntPtr, // DeclaringTypeId 967(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 971(byte)SpecialType.System_IntPtr, // DeclaringTypeId 975(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 979(byte)SpecialType.System_IntPtr, // DeclaringTypeId 982(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 987(byte)SpecialType.System_IntPtr, // DeclaringTypeId 990(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 995(byte)SpecialType.System_IntPtr, // DeclaringTypeId 998(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr,
SpecialTypeExtensions.cs (3)
30case SpecialType.System_IntPtr: 81case SpecialType.System_IntPtr: 154case SpecialType.System_IntPtr:
SpecialTypes.cs (2)
120s_typeIdToTypeCodeMap[(int)SpecialType.System_IntPtr] = Microsoft.Cci.PrimitiveTypeCode.IntPtr; 144s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.IntPtr] = SpecialType.System_IntPtr;
Microsoft.CodeAnalysis.CodeStyle (9)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (3)
30case SpecialType.System_IntPtr: 81case SpecialType.System_IntPtr: 154case SpecialType.System_IntPtr:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (3)
301case SpecialType.System_IntPtr when type.IsNativeIntegerType: 394case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 671case SpecialType.System_IntPtr:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\PredefinedTypeExtensions.cs (1)
31PredefinedType.IntPtr => SpecialType.System_IntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SpecialTypeExtensions.cs (1)
31SpecialType.System_IntPtr => PredefinedType.IntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
27visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
Microsoft.CodeAnalysis.CSharp (63)
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)
1711SpecialType.System_IntPtr when type.IsNativeIntegerType => BinaryOperatorKind.NInt,
Binder\Binder_Symbols.cs (1)
994node.IsNint ? SpecialType.System_IntPtr :
Binder\DecisionDagBuilder.cs (10)
1546case (SpecialType.System_IntPtr, SpecialType.System_UIntPtr): 1547case (SpecialType.System_UIntPtr, SpecialType.System_IntPtr): 1552case (SpecialType.System_Int32, SpecialType.System_IntPtr): 1554case (SpecialType.System_UInt32, SpecialType.System_IntPtr): 1556case (SpecialType.System_IntPtr, SpecialType.System_Int32): 1557case (SpecialType.System_IntPtr, SpecialType.System_UInt32): 1564case (SpecialType.System_Int64, SpecialType.System_IntPtr): 1566case (SpecialType.System_UInt64, SpecialType.System_IntPtr): 1568case (SpecialType.System_IntPtr, SpecialType.System_Int64): 1569case (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)
1361case SpecialType.System_IntPtr when destination.IsNativeIntegerType: 2092case SpecialType.System_IntPtr when type.IsNativeIntegerType: 2183(type.SpecialType == SpecialType.System_IntPtr || type.SpecialType == SpecialType.System_UIntPtr) && !type.IsNativeIntegerType; 3912case SpecialType.System_IntPtr:
Binder\Semantics\Operators\OperatorFacts.cs (1)
45case SpecialType.System_IntPtr when type.IsNativeIntegerType:
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3462case SpecialType.System_IntPtr when type.IsNativeIntegerType:
CodeGen\EmitConversion.cs (1)
387if (p1t == SpecialType.System_IntPtr || p1t == SpecialType.System_UIntPtr)
CodeGen\EmitExpression.cs (2)
1356case SpecialType.System_IntPtr: 3452else if (type.SpecialType == SpecialType.System_IntPtr)
CodeGen\EmitStatement.cs (1)
1799? _module.GetSpecialType(SpecialType.System_IntPtr, syntaxNode, _diagnostics.DiagnosticBag)
Compilation\CSharpCompilation.cs (1)
4112return 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)
2206Debug.Assert(leftType.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr); 2343destinationType = SpecialType.System_IntPtr; 2359destinationType = SpecialType.System_IntPtr; 2381TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2396TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2409TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2466_factory.SpecialType(SpecialType.System_IntPtr),
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (6)
1449if (t0Type == SpecialType.System_IntPtr) 1499else if (s0Type == SpecialType.System_IntPtr) 1606case SpecialType.System_IntPtr: 1608operand = RewriteDecimalConversionCore(syntax, operand, fromType, get64BitType(_compilation, signed: toType.SpecialType == SpecialType.System_IntPtr), isImplicit, constantValueOpt); 1616case SpecialType.System_IntPtr: 1618operand = MakeConversionNode(operand, get64BitType(_compilation, signed: fromType.SpecialType == SpecialType.System_IntPtr), @checked);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
941specialType = SpecialType.System_IntPtr;
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
649case 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)
178Compilation.GetSpecialType(SpecialType.System_IntPtr), 474Compilation.GetSpecialType(SpecialType.System_IntPtr),
Symbols\BaseTypeAnalysis.cs (1)
269case SpecialType.System_IntPtr:
Symbols\Compilation_WellKnownMembers.cs (1)
1051case SpecialType.System_IntPtr:
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
114case SpecialType.System_IntPtr:
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
1928case SpecialType.System_IntPtr: 2585Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr);
Symbols\MetadataOrSourceAssemblySymbol.cs (1)
146SpecialType.System_IntPtr => 0,
Symbols\MissingMetadataTypeSymbol.cs (1)
347Debug.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); 308Debug.Assert(_specialType == SpecialType.System_IntPtr || _specialType == SpecialType.System_UIntPtr);
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
62var intPtrType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax));
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1757Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr);
Symbols\SpecialTypeExtensions.cs (1)
48case SpecialType.System_IntPtr:
Symbols\TypeSymbol.cs (1)
559|| (SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr && this.ContainingAssembly.RuntimeSupportsNumericIntPtr);
Symbols\TypeSymbolExtensions.cs (4)
645case SpecialType.System_IntPtr when type.IsNativeIntegerType: 1411case SpecialType.System_IntPtr when type.IsNativeIntegerType: 2175case SpecialType.System_IntPtr when type.IsNativeIntegerType: return 12; 2198case SpecialType.System_IntPtr when underlyingType.IsNativeIntegerType: return 27;
Utilities\ValueSetFactory.cs (1)
50SpecialType.System_IntPtr when isNative => ForNint,
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
784=> type.IsSignedIntegralType() || type?.SpecialType is SpecialType.System_IntPtr;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
96else if (type.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
122syntax = 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)
1600return type.SpecialType == (signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr); 10356Assert.Same(nintType, comp.GetSpecialType(SpecialType.System_IntPtr)); 10379Assert.Equal(SpecialType.System_IntPtr, type.SpecialType);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
96else 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); 4842type.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)
Recommendations\CSharpRecommendationServiceRunner_Operators.cs (1)
55=> container.IsSpecialType() || container.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr;
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (2)
63if (specialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr && 67return SyntaxFactory.Identifier(specialType == SpecialType.System_IntPtr ? "nint" : "nuint");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
784=> type.IsSignedIntegralType() || type?.SpecialType is SpecialType.System_IntPtr;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
122syntax = IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint");
Microsoft.CodeAnalysis.Features (1)
PreferFrameworkType\PreferFrameworkTypeCodeFixProvider.cs (1)
60var 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)
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Spilling.vb (1)
493SpecialType.System_IntPtr,
Symbols\AnonymousTypes\AnonymousType_SymbolCollection.vb (1)
135Return Compilation.GetSpecialType(SpecialType.System_IntPtr)
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
1155SpecialType.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) 1099Dim 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 (9)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (3)
30case SpecialType.System_IntPtr: 81case SpecialType.System_IntPtr: 154case SpecialType.System_IntPtr:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (3)
301case SpecialType.System_IntPtr when type.IsNativeIntegerType: 394case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 671case SpecialType.System_IntPtr:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\PredefinedTypeExtensions.cs (1)
31PredefinedType.IntPtr => SpecialType.System_IntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SpecialTypeExtensions.cs (1)
31SpecialType.System_IntPtr => PredefinedType.IntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
27visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSManagedTypeInfo.cs (1)
64case { SpecialType: SpecialType.System_IntPtr }:
Microsoft.Interop.LibraryImportGenerator (4)
Analyzers\CustomMarshallerAttributeFixer.cs (4)
382return gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr)); 396return editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr); 549return gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr)); 563return editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr);
Microsoft.Interop.SourceGeneration (4)
ManagedTypeInfo.cs (1)
91public static readonly SpecialTypeInfo IntPtr = new("nint", "nint", SpecialType.System_IntPtr);
Marshalling\MarshalAsMarshallingGeneratorResolver.cs (1)
49or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_IntPtr }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.SysInt, _) }
TypeSymbolExtensions.cs (2)
185or SpecialType.System_IntPtr 200or SpecialType.System_IntPtr