57 references to VoidKeyword
ILLink.CodeFixProvider (2)
RequiresUnsafeCodeFixProvider.cs (2)
430isVoid = method.ReturnType is PredefinedTypeSyntax pts && pts.Keyword.IsKind(SyntaxKind.VoidKeyword); 434isVoid = localFunc.ReturnType is PredefinedTypeSyntax pts && pts.Keyword.IsKind(SyntaxKind.VoidKeyword);
Microsoft.CodeAnalysis.CSharp (16)
_generated\0\Syntax.xml.Main.Generated.cs (1)
2365case SyntaxKind.VoidKeyword: break;
_generated\1\Syntax.xml.Internal.Generated.cs (2)
28676case SyntaxKind.VoidKeyword: break; 34103case SyntaxKind.VoidKeyword: break;
Binder\Binder_AnonymousTypes.cs (1)
224expressionType = CreateErrorType(SyntaxFacts.GetText(SyntaxKind.VoidKeyword));
Parser\LanguageParser.cs (6)
2467case SyntaxKind.VoidKeyword: 2701this.AddError(SyntaxFactory.MissingToken(SyntaxKind.VoidKeyword), ErrorCode.ERR_MemberNeedsType)); 7602if (this.CurrentToken.Kind == SyntaxKind.VoidKeyword && this.PeekToken(1).Kind != SyntaxKind.AsteriskToken) 8034if (token.Kind == SyntaxKind.VoidKeyword && this.CurrentToken.Kind != SyntaxKind.AsteriskToken) 10821if (allowLocalFunctions && localFunction == null && type is PredefinedTypeSyntax { Keyword.Kind: SyntaxKind.VoidKeyword }) 12125if (this.CurrentToken.Kind != SyntaxKind.DotToken || tk == SyntaxKind.VoidKeyword)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
368AddKeyword(SyntaxKind.VoidKeyword);
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
270AddKeyword(SyntaxKind.VoidKeyword);
Syntax\SyntaxKindExtensions.cs (1)
15case SyntaxKind.VoidKeyword:
Syntax\SyntaxKindFacts.cs (3)
335case SyntaxKind.VoidKeyword: 911return SyntaxKind.VoidKeyword; 1612case SyntaxKind.VoidKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertTypeofToNameof\CSharpConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
36and not { Type: PredefinedTypeSyntax { Keyword.RawKind: (int)SyntaxKind.VoidKeyword } };
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
109public static readonly SyntaxToken VoidKeyword = Token(SyntaxKind.VoidKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
332case SyntaxKind.VoidKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
15predefinedType.Keyword.IsKind(SyntaxKind.VoidKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
341SyntaxKind.VoidKeyword => PredefinedType.Void, 512case SyntaxKind.VoidKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
58=> typeSyntax is PredefinedTypeSyntax { Keyword.RawKind: (int)SyntaxKind.VoidKeyword };
Microsoft.CodeAnalysis.CSharp.Features (7)
Completion\CompletionProviders\AwaitCompletionProvider.cs (1)
81if (existingReturnType is PredefinedTypeSyntax { Keyword: (kind: SyntaxKind.VoidKeyword) })
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
92if (targetToken.Kind() is SyntaxKind.VoidKeyword or SyntaxKind.PartialKeyword ||
Completion\KeywordRecommenders\VoidKeywordRecommender.cs (1)
13internal sealed class VoidKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.VoidKeyword)
Diagnostics\Analyzers\CSharpPreferFrameworkTypeDiagnosticAnalyzer.cs (1)
29=> node.Keyword.Kind() != SyntaxKind.VoidKeyword;
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
140!(returnType is PredefinedTypeSyntax predefinedType && predefinedType.Keyword.IsKindOrHasMatchingText(SyntaxKind.VoidKeyword)))
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertTypeofToNameof\CSharpConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
36and not { Type: PredefinedTypeSyntax { Keyword.RawKind: (int)SyntaxKind.VoidKeyword } };
src\roslyn\src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
58=> typeSyntax is PredefinedTypeSyntax { Keyword.RawKind: (int)SyntaxKind.VoidKeyword };
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
2144=> type is PredefinedTypeSyntax pd && pd.Keyword.IsKind(SyntaxKind.VoidKeyword) ? null : type;
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (1)
56SpecialType.System_Void => SyntaxKind.VoidKeyword,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
109public static readonly SyntaxToken VoidKeyword = Token(SyntaxKind.VoidKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
332case SyntaxKind.VoidKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
15predefinedType.Keyword.IsKind(SyntaxKind.VoidKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
341SyntaxKind.VoidKeyword => PredefinedType.Void, 512case SyntaxKind.VoidKeyword:
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\Legacy\NativeCSharpTokenizer.cs (1)
92CSharpSyntaxKind.VoidKeyword,
Microsoft.Interop.ComInterfaceGenerator (3)
Marshallers\IidParameterIndexMarshallerResolver.cs (3)
53VariableDeclaration(PointerType(PredefinedType(Token(SyntaxKind.VoidKeyword)))) 59PointerType(PredefinedType(Token(SyntaxKind.VoidKeyword))), 142PointerType(PredefinedType(Token(SyntaxKind.VoidKeyword))),
Microsoft.Interop.JavaScript.JSImportGenerator (6)
JSExportGenerator.cs (3)
120MemberDeclarationSyntax wrappperMethod = MethodDeclaration(PredefinedType(Token(SyntaxKind.VoidKeyword)), Identifier(wrapperName)) 215MemberDeclarationSyntax method = MethodDeclaration(PredefinedType(Token(SyntaxKind.VoidKeyword)), Identifier(initializerName)) 221MemberDeclarationSyntax initializerMethod = MethodDeclaration(PredefinedType(Token(SyntaxKind.VoidKeyword)), Identifier(trimmingPreserveName))
JSImportGenerator.cs (1)
324hasReturn ? jsMarshalerArgument : PredefinedType(Token(SyntaxKind.VoidKeyword)),
JSManagedTypeInfo.cs (2)
22Syntax = SyntaxFactory.PredefinedType(SyntaxFactory.Token(SyntaxKind.VoidKeyword)) 119return new JSTaskTypeInfo(new JSSimpleTypeInfo(KnownManagedType.Void, SyntaxFactory.PredefinedType(SyntaxFactory.Token(SyntaxKind.VoidKeyword))));
Microsoft.Interop.SourceGeneration (3)
Marshalling\StaticPinnableManagedValueMarshaller.cs (2)
31&& predefinedType.Keyword.IsKind(SyntaxKind.VoidKeyword)) 81PointerType(PredefinedType(Token(SyntaxKind.VoidKeyword))),
TypeNames.cs (1)
46public static TypeSyntax VoidStar { get; } = PointerType(PredefinedType(Token(SyntaxKind.VoidKeyword)));
Roslyn.Diagnostics.CSharp.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
109public static readonly SyntaxToken VoidKeyword = Token(SyntaxKind.VoidKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
332case SyntaxKind.VoidKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
15predefinedType.Keyword.IsKind(SyntaxKind.VoidKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
341SyntaxKind.VoidKeyword => PredefinedType.Void, 512case SyntaxKind.VoidKeyword: