34 instantiations of PointerTypeSymbol
Microsoft.CodeAnalysis.CSharp (24)
Binder\Binder_Conversions.cs (1)
2426stackAllocType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType));
Binder\Binder_Expressions.cs (3)
373var type = new PointerTypeSymbol(TypeWithAnnotations.Create(boundStackAlloc.ElementType)); 4509new PointerTypeSymbol(BindType(typeSyntax, diagnostics))); 4548new PointerTypeSymbol(elementType));
Binder\Binder_Operators.cs (1)
3980TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(operandType));
Binder\Binder_Statements.cs (1)
1365TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType));
Binder\Binder_Symbols.cs (1)
609return TypeWithAnnotations.Create(new PointerTypeSymbol(elementType));
Binder\Semantics\Conversions\Conversions.cs (1)
514var sourceAsPointer = new PointerTypeSymbol(TypeWithAnnotations.Create(sourceExpression.ElementType));
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
595var voidPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(Compilation.GetSpecialType(SpecialType.System_Void)));
Compilation\CSharpCompilation.cs (1)
2417return new PointerTypeSymbol(TypeWithAnnotations.Create(elementType, elementNullableAnnotation));
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
390return new PointerTypeSymbol(symbol.PointedAtTypeWithAnnotations.WithTypeAndModifiers(otherPointedAtType, otherModifiers)); 913return new PointerTypeSymbol(symbol.PointedAtTypeWithAnnotations.WithTypeAndModifiers(translatedPointedAtType, translatedModifiers));
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
378var operandType = new PointerTypeSymbol(TypeWithAnnotations.Create(_factory.SpecialType(SpecialType.System_Void)));
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
562BoundExpression firstElementAddress = new BoundAddressOfOperator(factory.Syntax, firstElement, type: new PointerTypeSymbol(arrayElementType));
Lowering\SyntheticBoundNodeFactory.cs (1)
1244return new BoundPointerIndirectionOperator(Syntax, Default(new PointerTypeSymbol(type)), refersToLocation: false, type.Type);
Symbols\AbstractTypeMap.cs (1)
236return new PointerTypeSymbol(pointedAtType);
Symbols\AssemblySymbol.cs (1)
777return new PointerTypeSymbol(TypeWithAnnotations.Create(symbol));
Symbols\Metadata\PE\DynamicTypeDecoder.cs (1)
343new PointerTypeSymbol(pointerType.PointedAtTypeWithAnnotations.WithTypeAndModifiers(transformedPointedAtType, pointerType.PointedAtTypeWithAnnotations.CustomModifiers));
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
337type = TypeWithAnnotations.Create(new PointerTypeSymbol(TypeWithAnnotations.Create(fixedElementType)));
Symbols\Metadata\PE\SymbolFactory.cs (1)
46return new PointerTypeSymbol(CreateType(type, customModifiers));
Symbols\PointerTypeSymbol.cs (1)
285return PointedAtTypeWithAnnotations.IsSameAs(newPointedAtType) ? this : new PointerTypeSymbol(newPointedAtType);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
756return new PointerTypeSymbol(newPointed);
Symbols\Source\SourceMemberFieldSymbol.cs (1)
572type = TypeWithAnnotations.Create(new PointerTypeSymbol(type));
Symbols\TypeSymbolExtensions.cs (1)
2039pointerType = new PointerTypeSymbol(pointedAtType);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\UnsafeTests.cs (7)
7853var structPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(structType)); 8166var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 8233var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 8291var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 10220var charPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(charSymbol)); 10292var charPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(charSymbol)); 10294var voidPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(voidSymbol));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Symbols\Metadata\PE\DynamicTransformsTests.cs (1)
340var pointerToInt = new PointerTypeSymbol(TypeWithAnnotations.Create(_intType));
Symbols\MockSymbolTests.cs (1)
55PointerTypeSymbol pts1 = new PointerTypeSymbol(TypeWithAnnotations.Create(pointedAtType));
Symbols\Source\ModifierTests.cs (1)
158var pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(typeParamType, customModifiers: customModifiers)); // NOTE: We're constructing this manually, since it's illegal.
131 references to PointerTypeSymbol
Microsoft.CodeAnalysis.CSharp (106)
Binder\Binder_Crefs.cs (1)
742return ContainsNestedTypeOfUnconstructedGenericType(((PointerTypeSymbol)type).PointedAtType);
Binder\Binder_Expressions.cs (3)
373var type = new PointerTypeSymbol(TypeWithAnnotations.Create(boundStackAlloc.ElementType)); 9925PointerTypeSymbol pointerType = (PointerTypeSymbol)expr.Type;
Binder\Binder_Operators.cs (2)
3903var operandType = operand.Type as PointerTypeSymbol;
Binder\Binder_Statements.cs (1)
1255elementType = ((PointerTypeSymbol)fa.Type).PointedAtType;
Binder\Semantics\AccessCheck.cs (1)
155return IsSymbolAccessibleCore(((PointerTypeSymbol)symbol).PointedAtType, within, null, out failedThroughTypeCheck, compilation, ref useSiteInfo, basesBeingResolved);
Binder\Semantics\Conversions\Conversions.cs (1)
514var sourceAsPointer = new PointerTypeSymbol(TypeWithAnnotations.Create(sourceExpression.ElementType));
Binder\Semantics\Conversions\ConversionsBase.cs (1)
3371return source.IsPointerOrFunctionPointer() && destination is PointerTypeSymbol { PointedAtType: { SpecialType: SpecialType.System_Void } };
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (6)
555PointerTypeSymbol pointerType, 595var voidPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(Compilation.GetSpecialType(SpecialType.System_Void))); 696var leftType = left.Type as PointerTypeSymbol; 697var rightType = right.Type as PointerTypeSymbol;
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (2)
575var pointerType = operand.Type as PointerTypeSymbol;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
1890ExactInference(((PointerTypeSymbol)source.Type).PointedAtTypeWithAnnotations, ((PointerTypeSymbol)target.Type).PointedAtTypeWithAnnotations, ref useSiteInfo);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (4)
2808var p1 = (PointerTypeSymbol)t1; 2809var p2 = (PointerTypeSymbol)t2;
CodeGen\EmitStackAllocInitializer.cs (2)
24Debug.Assert(type is PointerTypeSymbol || type is NamedTypeSymbol); 28? ((PointerTypeSymbol)type).PointedAtTypeWithAnnotations
CodeGen\EmitStatement.cs (2)
1800PointerTypeSymbol pointerType = (PointerTypeSymbol)local.Type;
CodeGen\Optimizer.cs (1)
1019left.Type.Equals(((PointerTypeSymbol)right.Type).PointedAtType, TypeCompareKind.AllIgnoreOptions);
Compilation\CSharpCompilation.cs (3)
2410internal PointerTypeSymbol CreatePointerTypeSymbol(TypeSymbol elementType, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 4437csharpLeftType is PointerTypeSymbol { PointedAtType.SpecialType: SpecialType.System_Void } && 4438csharpRightType is PointerTypeSymbol { PointedAtType.SpecialType: SpecialType.System_Void })
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
220public override object VisitPointerType(PointerTypeSymbol symbol, StringBuilder builder)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (6)
380public override Symbol? VisitPointerType(PointerTypeSymbol symbol) 668private bool ArePointerTypesEqual(PointerTypeSymbol type, PointerTypeSymbol other) 767return ArePointerTypesEqual((PointerTypeSymbol)type, (PointerTypeSymbol)other); 909public override Symbol VisitPointerType(PointerTypeSymbol symbol)
Emitter\Model\PEModuleBuilder.cs (2)
1155return Translate((PointerTypeSymbol)typeSymbol); 1450internal Cci.IPointerTypeReference Translate(PointerTypeSymbol symbol)
Emitter\Model\PointerTypeSymbolAdapter.cs (2)
145internal PointerTypeSymbolAdapter(PointerTypeSymbol underlyingPointerTypeSymbol) 151internal PointerTypeSymbol AdaptedPointerTypeSymbol { get; }
FlowAnalysis\NullableWalker.cs (2)
4792PointerTypeSymbol pointerType => pointerType.PointedAtTypeWithAnnotations, 4869PointerTypeSymbol pointerType => pointerType.WithPointedAtType(inferredType),
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
378var operandType = new PointerTypeSymbol(TypeWithAnnotations.Create(_factory.SpecialType(SpecialType.System_Void)));
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (5)
2279loweredRight = MakeSizeOfMultiplication(loweredRight, (PointerTypeSymbol)loweredLeft.Type, kind.IsChecked()); 2284loweredLeft = MakeSizeOfMultiplication(loweredLeft, (PointerTypeSymbol)loweredRight.Type, kind.IsChecked()); 2320private BoundExpression MakeSizeOfMultiplication(BoundExpression numericOperand, PointerTypeSymbol pointerType, bool isChecked) 2474PointerTypeSymbol pointerType = (PointerTypeSymbol)loweredLeft.Type;
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
247TypeSymbol initializerType = ((PointerTypeSymbol)initializerExpr.Type).PointedAtType;
Symbols\AbstractTypeMap.cs (3)
110result = SubstitutePointerType((PointerTypeSymbol)previous); 227private PointerTypeSymbol SubstitutePointerType(PointerTypeSymbol t)
Symbols\Compilation_WellKnownMembers.cs (2)
960HandleCustomModifiers(((PointerTypeSymbol)type).PointedAtTypeWithAnnotations.CustomModifiers.Length, transformFlagsBuilder); 1150return type.Kind == SymbolKind.PointerType ? ((PointerTypeSymbol)type).PointedAtType : null;
Symbols\ConstraintsHelper.cs (1)
598Binder.CheckManagedAddr(args.CurrentCompilation, ((PointerTypeSymbol)type).PointedAtType, args.Location, args.Diagnostics);
Symbols\Metadata\PE\DynamicTypeDecoder.cs (3)
167return TransformPointerType((PointerTypeSymbol)type); 325private PointerTypeSymbol TransformPointerType(PointerTypeSymbol pointerType)
Symbols\Metadata\PE\MetadataDecoder.cs (1)
225return IsOrClosedOverATypeFromAssemblies(((PointerTypeSymbol)symbol).PointedAtType, assemblies);
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (3)
89return TransformPointerType((PointerTypeSymbol)type); 163private PointerTypeSymbol? TransformPointerType(PointerTypeSymbol type)
Symbols\Metadata\PE\TupleTypeDecoder.cs (3)
171return DecodePointerType((PointerTypeSymbol)type); 204private PointerTypeSymbol DecodePointerType(PointerTypeSymbol type)
Symbols\PointerTypeSymbol.cs (5)
225current = ((PointerTypeSymbol)current).PointedAtType; 233return this.Equals(t2 as PointerTypeSymbol, comparison); 236private bool Equals(PointerTypeSymbol? other, TypeCompareKind comparison) 279TypeWithAnnotations pointedAtType = PointedAtTypeWithAnnotations.MergeEquivalentTypes(((PointerTypeSymbol)other).PointedAtTypeWithAnnotations, VarianceKind.None); 283internal PointerTypeSymbol WithPointedAtType(TypeWithAnnotations newPointedAtType)
Symbols\PublicModel\PointerTypeSymbol.cs (2)
13private readonly Symbols.PointerTypeSymbol _underlying; 16public PointerTypeSymbol(Symbols.PointerTypeSymbol underlying, CodeAnalysis.NullableAnnotation nullableAnnotation)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (4)
654return IsOrClosedOverAnExplicitLocalType(((PointerTypeSymbol)symbol).PointedAtType); 746public PointerTypeSymbol Retarget(PointerTypeSymbol type) 1339public override Symbol VisitPointerType(PointerTypeSymbol symbol, RetargetOptions options)
Symbols\Source\SourceFixedFieldSymbol.cs (4)
48var item1 = new TypedConstant(systemType, TypedConstantKind.Type, ((PointerTypeSymbol)this.Type).PointedAtType); 110TypeSymbol elementType = ((PointerTypeSymbol)this.Type).PointedAtType; 161_internalField = new SynthesizedFieldSymbol(this, ((PointerTypeSymbol)field.Type).PointedAtType, FixedElementFieldName, isPublic: true); 184var elementType = ((PointerTypeSymbol)_field.Type).PointedAtType;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
584var elementType = ((PointerTypeSymbol)type.Type).PointedAtType;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
120else if (type is PointerTypeSymbol pointer)
Symbols\SymbolDistinguisher.cs (1)
148symbol = ((PointerTypeSymbol)symbol).PointedAtType;
Symbols\SymbolExtensions.cs (1)
658internal static IPointerTypeSymbol? GetPublicSymbol(this PointerTypeSymbol? symbol)
Symbols\SymbolVisitor.cs (1)
95public virtual void VisitPointerType(PointerTypeSymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
95public virtual TResult VisitPointerType(PointerTypeSymbol symbol)
Symbols\SymbolVisitor`2.cs (2)
112/// Called when visiting a <see cref="PointerTypeSymbol" />; Override this with specific 118public virtual TResult VisitPointerType(PointerTypeSymbol symbol, TArgument argument)
Symbols\TypeSymbolExtensions.cs (6)
928next = ((PointerTypeSymbol)current).PointedAtTypeWithAnnotations; 1498return type is PointerTypeSymbol; 1553return type is PointerTypeSymbol p && p.PointedAtType.IsVoidType(); 1937var pointerType = (PointerTypeSymbol)type; 2031private static bool NormalizeTaskTypesInPointer(CSharpCompilation compilation, ref PointerTypeSymbol pointerType)
Symbols\TypeUnification.cs (5)
135PointerTypeSymbol pt1 = (PointerTypeSymbol)t1.Type; 136PointerTypeSymbol pt2 = (PointerTypeSymbol)t2.Type; 272return Contains(((PointerTypeSymbol)type).PointedAtType, typeParam);
Utilities\TypeSymbolExtensions.cs (4)
38var pointer = (PointerTypeSymbol)type; 106var pointer = (PointerTypeSymbol)type;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Emit\EditAndContinue\SymbolMatcherTests.cs (3)
194Assert.Equal(1, ((PointerTypeSymbol)member1.Parameters[0].Type).PointedAtTypeWithAnnotations.CustomModifiers.Length); 201Assert.Equal(1, ((PointerTypeSymbol)other.Parameters[0].Type).PointedAtTypeWithAnnotations.CustomModifiers.Length); 409var member = compilation1.CreatePointerTypeSymbol(elementType);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\RecordStructTests.cs (1)
578Assert.IsType<PointerTypeSymbol>(((Symbols.PublicModel.PointerTypeSymbol)type).UnderlyingTypeSymbol);
Semantics\UnsafeTests.cs (9)
5947Assert.Equal(SpecialType.System_TypedReference, ((PointerTypeSymbol)returnType).PointedAtType.SpecialType); 5951Assert.Equal(SpecialType.System_TypedReference, ((PointerTypeSymbol)parameterType).PointedAtType.SpecialType); 7853var structPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(structType)); 8166var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 8233var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 8291var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 10220var charPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(charSymbol)); 10292var charPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(charSymbol)); 10294var voidPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(voidSymbol));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Symbols\Metadata\PE\DynamicTransformsTests.cs (1)
340var pointerToInt = new PointerTypeSymbol(TypeWithAnnotations.Create(_intType));
Symbols\Metadata\PE\LoadCustomModifiers.cs (2)
100PointerTypeSymbol p6Type = (PointerTypeSymbol)p6.Type;
Symbols\MockSymbolTests.cs (1)
55PointerTypeSymbol pts1 = new PointerTypeSymbol(TypeWithAnnotations.Create(pointedAtType));
Symbols\Retargeting\RetargetCustomModifiers.cs (4)
110PointerTypeSymbol p6Type = (PointerTypeSymbol)p6.Type; 210PointerTypeSymbol p1Type = (PointerTypeSymbol)p1.Type;
Symbols\Source\ModifierTests.cs (3)
158var pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(typeParamType, customModifiers: customModifiers)); // NOTE: We're constructing this manually, since it's illegal. 163var substitutedPointerType = (PointerTypeSymbol)typeMap.SubstituteType(pointerType).AsTypeSymbolOnly();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
UsesIsNullableVisitor.cs (1)
195return UsesIsNullable(((PointerTypeSymbol)type).PointedAtTypeWithAnnotations, inProgress);