13 references to UnsafeKeyword
Microsoft.CodeAnalysis.CSharp (7)
Binder\Binder_Statements.cs (2)
176
Error(diagnostics, ErrorCode.ERR_IllegalUnsafe, node.
UnsafeKeyword
);
180
CheckFeatureAvailability(node.
UnsafeKeyword
, MessageID.IDS_FeatureRefUnsafeInIteratorAsync, diagnostics);
Syntax.xml.Main.Generated.cs (1)
1909
=> node.Update(VisitList(node.AttributeLists), VisitToken(node.
UnsafeKeyword
), (BlockSyntax?)Visit(node.Block) ?? throw new ArgumentNullException("block"));
Syntax.xml.Syntax.Generated.cs (3)
8199
if (attributeLists != this.AttributeLists || unsafeKeyword != this.
UnsafeKeyword
|| block != this.Block)
8210
public new UnsafeStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.
UnsafeKeyword
, this.Block);
8212
public UnsafeStatementSyntax WithBlock(BlockSyntax block) => Update(this.AttributeLists, this.
UnsafeKeyword
, block);
Syntax\LookupPosition.cs (1)
357
return ((UnsafeStatementSyntax)statement).
UnsafeKeyword
;
Microsoft.CodeAnalysis.CSharp.Features (2)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1833
return ((UnsafeStatementSyntax)node).
UnsafeKeyword
.Span;
Highlighting\KeywordHighlighters\UnsafeStatementHighlighter.cs (1)
28
=> highlights.Add(unsafeStatement.
UnsafeKeyword
.Span);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Generated\Syntax.Test.xml.Generated.cs (2)
12743
Assert.Equal(SyntaxKind.UnsafeKeyword, node.
UnsafeKeyword
.Kind());
12745
var newNode = node.WithAttributeLists(node.AttributeLists).WithUnsafeKeyword(node.
UnsafeKeyword
).WithBlock(node.Block);
Parsing\StatementParsingTests.cs (2)
1462
Assert.NotEqual(default, us.
UnsafeKeyword
);
1463
Assert.Equal(SyntaxKind.UnsafeKeyword, us.
UnsafeKeyword
.Kind());