1 implementation of IFunctionPointerTypeSymbol
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\FunctionPointerTypeSymbol.cs (1)
10internal sealed class FunctionPointerTypeSymbol : TypeSymbol, IFunctionPointerTypeSymbol
85 references to IFunctionPointerTypeSymbol
Microsoft.CodeAnalysis (8)
Compilation\Compilation.cs (4)
1118public IFunctionPointerTypeSymbol CreateFunctionPointerTypeSymbol( 1129protected abstract IFunctionPointerTypeSymbol CommonCreateFunctionPointerTypeSymbol( 1717var funcPtr = (IFunctionPointerTypeSymbol)s;
Operations\OperationExtensions.cs (1)
22return ((IFunctionPointerTypeSymbol)functionPointer.Target.Type!).Signature;
Symbols\SymbolVisitor.cs (1)
93public virtual void VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
96public virtual TResult? VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
Symbols\SymbolVisitor`2.cs (1)
101public virtual TResult VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol, TArgument argument)
Microsoft.CodeAnalysis.CodeStyle (19)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
86if (whenPartType is IPointerTypeSymbol or IFunctionPointerTypeSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (1)
74public override bool VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
105var funcPtrSignature = ((IFunctionPointerTypeSymbol)symbol).Signature;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.AnonymousTypeRemover.cs (1)
33public override ITypeSymbol VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.CollectTypeParameterSymbolsVisitor.cs (1)
37public override void VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (1)
27public override Accessibility VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
50public override ITypeSymbol VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
34public override ITypeSymbol VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnnamedErrorTypeRemover.cs (1)
33public override ITypeSymbol VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.FunctionPointerTypeSymbolKey.cs (5)
14private sealed class FunctionPointerTypeSymbolKey : AbstractSymbolKey<IFunctionPointerTypeSymbol> 18public sealed override void Create(IFunctionPointerTypeSymbol symbol, SymbolKeyWriter visitor) 35SymbolKeyReader reader, IFunctionPointerTypeSymbol? contextualSymbol, out string? failureReason) 42using var modifiersBuilder = reader.ReadSymbolKeyArray<IFunctionPointerTypeSymbol, INamedTypeSymbol>( 58using var parameterTypes = reader.ReadSymbolKeyArray<IFunctionPointerTypeSymbol, ITypeSymbol>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
455public override void VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
134SymbolKind.FunctionPointerType => FunctionPointerTypesAreEquivalent((IFunctionPointerTypeSymbol)x, (IFunctionPointerTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Microsoft.CodeAnalysis.CSharp (5)
Compilation\CSharpCompilation.cs (1)
4014protected override IFunctionPointerTypeSymbol CommonCreateFunctionPointerTypeSymbol(
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
151public override void VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
Symbols\SymbolExtensions.cs (3)
677internal static IFunctionPointerTypeSymbol? GetPublicSymbol(this FunctionPointerTypeSymbol? symbol) 679return symbol.GetPublicSymbol<IFunctionPointerTypeSymbol>(); 820internal static FunctionPointerTypeSymbol? GetSymbol(this IFunctionPointerTypeSymbol? symbol)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
164if (semanticModel.GetTypeInfo(testedExpression, cancellationToken).Type is IPointerTypeSymbol or IFunctionPointerTypeSymbol)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
130public override TypeSyntax VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1933else if (inferredType.InferredType is IFunctionPointerTypeSymbol functionPointerType)
Microsoft.CodeAnalysis.CSharp.Features (3)
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (2)
83if (invokedType is INamedTypeSymbol { TypeKind: TypeKind.Delegate } or IFunctionPointerTypeSymbol) 135else if (invokedType is IFunctionPointerTypeSymbol functionPointerType)
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
164if (semanticModel.GetTypeInfo(testedExpression, cancellationToken).Type is IPointerTypeSymbol or IFunctionPointerTypeSymbol)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\FunctionPointerTests.cs (6)
1620var functionPointer = (IFunctionPointerTypeSymbol)methodSymbol.Parameters[0].Type; 1780var functionPointer = (IFunctionPointerTypeSymbol)methodSymbol.Parameters[0].Type; 1941var functionPointer = (IFunctionPointerTypeSymbol)m1InvocationSymbol.Parameters[0].Type;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Compilation\SymbolVisitorTests.cs (3)
157public override void VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol) 341public override string VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol) 493public override int VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol, StringBuilder argument)
Symbols\FunctionPointerTypeSymbolTests.cs (8)
1268Assert.True(((IFunctionPointerTypeSymbol)typeInfo.Type!).Signature.ReturnType.IsErrorType()); 1553var ptr = comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.VarArgs); 1567var ptr = comp.CreateFunctionPointerTypeSymbol( 1582var ptr = comp.CreateFunctionPointerTypeSymbol( 1599var ptr = comp.CreateFunctionPointerTypeSymbol( 1617var ptr = comp.CreateFunctionPointerTypeSymbol( 1638var ptr = comp.CreateFunctionPointerTypeSymbol(@string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, convention); 1653var ptr = comp.CreateFunctionPointerTypeSymbol(@string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, SignatureCallingConvention.Unmanaged, ImmutableArray.Create(cdeclType, stdcallType)!);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
FunctionPointerUtilities.cs (5)
171if (exprType is IFunctionPointerTypeSymbol ptrType) 179verifyNestedFunctionPointerSyntaxSemanticInfo(model, (IFunctionPointerTypeSymbol)exprType, paramSyntaxes); 236static void verifyNestedFunctionPointerSyntaxSemanticInfo(SemanticModel model, IFunctionPointerTypeSymbol ptrType, SeparatedSyntaxList<FunctionPointerParameterSyntax> paramSyntaxes) 264var paramPtrType = (IFunctionPointerTypeSymbol)semanticInfo.Type!;
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
130public override TypeSyntax VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1933else if (inferredType.InferredType is IFunctionPointerTypeSymbol functionPointerType)
Microsoft.CodeAnalysis.Features (2)
ExtractMethod\MethodExtractor.TypeParameterCollector.cs (1)
34public override void VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
86if (whenPartType is IPointerTypeSymbol or IFunctionPointerTypeSymbol)
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\TestOperationVisitor.cs (1)
571Assert.Same(((IFunctionPointerTypeSymbol)operation.Target.Type).Signature, signature);
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\VisualBasicCompilation.vb (1)
2902callingConventionTypes As ImmutableArray(Of INamedTypeSymbol)) As IFunctionPointerTypeSymbol
Microsoft.CodeAnalysis.Workspaces (19)
FindSymbols\FindReferences\Finders\ExplicitConversionSymbolReferenceFinder.UnderlyingNamedTypeVisitor.cs (1)
25public override INamedTypeSymbol? VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (1)
74public override bool VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
105var funcPtrSignature = ((IFunctionPointerTypeSymbol)symbol).Signature;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.AnonymousTypeRemover.cs (1)
33public override ITypeSymbol VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.CollectTypeParameterSymbolsVisitor.cs (1)
37public override void VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (1)
27public override Accessibility VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
50public override ITypeSymbol VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
34public override ITypeSymbol VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnnamedErrorTypeRemover.cs (1)
33public override ITypeSymbol VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.FunctionPointerTypeSymbolKey.cs (5)
14private sealed class FunctionPointerTypeSymbolKey : AbstractSymbolKey<IFunctionPointerTypeSymbol> 18public sealed override void Create(IFunctionPointerTypeSymbol symbol, SymbolKeyWriter visitor) 35SymbolKeyReader reader, IFunctionPointerTypeSymbol? contextualSymbol, out string? failureReason) 42using var modifiersBuilder = reader.ReadSymbolKeyArray<IFunctionPointerTypeSymbol, INamedTypeSymbol>( 58using var parameterTypes = reader.ReadSymbolKeyArray<IFunctionPointerTypeSymbol, ITypeSymbol>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
455public override void VisitFunctionPointerType(IFunctionPointerTypeSymbol symbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
134SymbolKind.FunctionPointerType => FunctionPointerTypesAreEquivalent((IFunctionPointerTypeSymbol)x, (IFunctionPointerTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)