393 references to GetLocation
Microsoft.CodeAnalysis (2)
Compilation\Compilation.cs (1)
2447
diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_EncodinglessSyntaxTree, tree.GetRoot().
GetLocation
()));
Syntax\SyntaxNodeOrToken.cs (1)
835
return _nodeOrParent?.
GetLocation
();
Microsoft.CodeAnalysis.CodeStyle (55)
AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
122
var additionalLocations = ImmutableArray.Create(binaryLike.
GetLocation
());
AbstractConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
46
var location = parent.
GetLocation
();
AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
84
nameSyntax.
GetLocation
(),
AbstractPopulateSwitchDiagnosticAnalyzer.cs (1)
67
additionalLocations: new[] { switchBlock.
GetLocation
() });
AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
82
additionalLocations: new[] { operation.Syntax.
GetLocation
() },
AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (3)
85
reportDiagnostic(Diagnostic.Create(s_invalidScopeDescriptor, attributeSyntax.
GetLocation
()));
92
reportDiagnostic(Diagnostic.Create(s_invalidOrMissingTargetDescriptor, attributeSyntax.
GetLocation
()));
115
reportDiagnostic(Diagnostic.Create(LegacyFormatTargetDescriptor, targetValueOperation.Syntax.
GetLocation
(), properties!, targetSymbolString));
AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
71
ImmutableArray.Create(node.
GetLocation
()));
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (2)
110
parenthesizedExpression.
GetLocation
());
130
var parenthesizedExpressionLocation = parenthesizedExpression.
GetLocation
();
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
667
var diagnostic = Diagnostic.Create(s_removeUnnecessarySuppressionDescriptor, attribute.
GetLocation
(), severity, additionalLocations: null, properties: null);
AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
183
value.Syntax.
GetLocation
(),
AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
142
conditionalExpression.
GetLocation
(),
AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (1)
70
additionalLocations: ImmutableArray.Create(interpolation.Syntax.
GetLocation
()),
AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
152
nextInvocation.Syntax.
GetLocation
(),
AbstractUseAutoPropertyAnalyzer.cs (4)
326
propertyDeclaration.
GetLocation
(),
327
variableDeclarator.
GetLocation
());
332
fieldNode.
GetLocation
(),
340
Descriptor, propertyDeclaration.
GetLocation
(),
AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (3)
123
expressionToCoalesce.
GetLocation
(),
124
ifStatement.
GetLocation
(),
125
whenTrueStatement.
GetLocation
()),
AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (4)
127
conditionalExpression.
GetLocation
(),
128
conditionExpression.
GetLocation
(),
129
whenPartToKeep.
GetLocation
());
133
conditionalExpression.
GetLocation
(),
AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (4)
124
conditionalExpression.
GetLocation
(),
125
conditionPartToCheck.
GetLocation
(),
126
whenPartToCheck.
GetLocation
());
130
conditionalExpression.
GetLocation
(),
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
121
var locations = ImmutableArray.Create(objectCreationExpression.
GetLocation
());
AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
151
additionalLocations: ImmutableArray.Create(assignment.
GetLocation
()),
162
additionalLocations: ImmutableArray.Create(assignment.
GetLocation
()),
173
additionalLocations: ImmutableArray.Create(assignment.
GetLocation
()),
AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
59
additionalLocations: ImmutableArray.Create(ifStatement.
GetLocation
()),
AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (2)
132
var additionalLocations = ImmutableArray.Create(invocation.
GetLocation
());
143
Descriptor, nameNode.
GetLocation
(),
AbstractUseNullPropagationDiagnosticAnalyzer.cs (4)
178
conditionalExpression.
GetLocation
(),
179
conditionPartToCheck.
GetLocation
(),
180
whenPartToCheck.
GetLocation
());
189
conditionalExpression.
GetLocation
(),
AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (3)
99
ifStatement.
GetLocation
(),
100
trueStatement.
GetLocation
(),
101
whenPartMatch.
GetLocation
()),
AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
108
var locations = ImmutableArray.Create(objectCreationExpression.
GetLocation
());
AbstractUseThrowExpressionDiagnosticAnalyzer.cs (5)
129
ifOperation.Syntax.
GetLocation
(),
130
throwOperation.Exception.Syntax.
GetLocation
(),
131
assignmentExpression.Value.Syntax.
GetLocation
(),
132
expressionStatement.Syntax.
GetLocation
());
135
DiagnosticHelper.Create(Descriptor, throwStatementSyntax.
GetLocation
(), option.Notification.Severity, additionalLocations: allLocations, properties: null));
SymbolKey.BodyLevelSymbolKey.cs (1)
34
result.Add(syntaxRef.GetSyntax(cancellationToken).
GetLocation
());
UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
66
nameNode.
GetLocation
(),
UseSystemHashCodeDiagnosticAnalyzer.cs (2)
73
var operationLocation = operation.Syntax.
GetLocation
();
74
var declarationLocation = context.OwningSymbol.DeclaringSyntaxReferences[0].GetSyntax(cancellationToken).
GetLocation
();
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder_Expressions.cs (3)
350
diagnostics.Add(ErrorCode.ERR_DefaultLiteralNoTargetType, defaultExpr.Syntax.
GetLocation
());
373
diagnostics.Add(ErrorCode.ERR_ImplicitObjectCreationNoTargetType, expr.Syntax.
GetLocation
(), expr.Display);
410
diagnostics.Add(ErrorCode.ERR_CannotInferDelegateType, syntax.
GetLocation
());
Binder\Binder_Invocation.cs (1)
1508
return expression.
GetLocation
();
Binder\Binder_Symbols.cs (1)
2696
return CheckFeatureAvailability(syntax.SyntaxTree, feature, diagnostics, location ?? syntax.
GetLocation
());
Binder\ExecutableCodeBinder.cs (1)
122
Location errorLocation = (iterator as SynthesizedSimpleProgramEntryPointSymbol)?.ReturnTypeSyntax.
GetLocation
() ?? iterator.Locations[0];
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
273
if (HadStaticInstanceMismatch(diagnostics, symbols, invokedExpression?.
GetLocation
() ?? location, binder, receiver, nodeOpt, delegateOrFunctionPointerType))
Errors\MessageID.cs (2)
326
diagnostics.Add(diag, location ?? syntax.
GetLocation
());
341
diagnostics.Add(diag, location ?? syntax.
GetLocation
());
FlowAnalysis\NullableWalker.cs (12)
765
Diagnostics.Add(ErrorCode.WRN_MemberNotNull, syntaxOpt?.
GetLocation
() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name);
836
Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.
GetLocation
() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
1170
location = syntaxOpt?.
GetLocation
() ?? methodMainNode.Syntax.GetLastToken().GetLocation();
1256
var location = syntaxOpt?.
GetLocation
() ?? methodMainNode.Syntax.GetLastToken().GetLocation();
1279
ReportDiagnostic(ErrorCode.WRN_ShouldNotReturn, syntaxOpt?.
GetLocation
() ?? methodMainNode.Syntax.GetLastToken().GetLocation());
2251
location ??= value.Syntax.
GetLocation
();
2507
ReportDiagnostic(errorCode, syntaxNode.
GetLocation
(), arguments);
7758
diagnosticLocation: (conversionOpt ?? convertedNode).Syntax.
GetLocation
());
7960
diagnosticLocationOpt ??= (conversionOpt ?? conversionOperand).Syntax.
GetLocation
();
8501
Location operandLocation = conversionOperand.Syntax.
GetLocation
();
9754
ReportNullabilityMismatchInArgument(argument.
GetLocation
(), argumentType, parameter, parameterType, forOutput);
10101
ReportDiagnostic(ErrorCode.WRN_NullReferenceReceiver, expr.Syntax.
GetLocation
());
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
478
return GetSourceDocument(debugDocumentProvider, syntax, syntax.
GetLocation
().GetMappedLineSpan());
500
return AddAnalysisPoint(syntaxForSpan, syntaxForSpan.
GetLocation
().GetMappedLineSpan(), statementFactory);
Lowering\MethodToClassRewriter.cs (1)
734
: base(containingType, methodBeingWrapped, syntax.SyntaxTree.GetReference(syntax), syntax.
GetLocation
(), name, DeclarationModifiers.Private,
Symbols\Source\SourceLocalSymbol.cs (1)
583
diagnostics.Add(ErrorCode.ERR_CircConstValue, node.
GetLocation
(), this);
Symbols\Source\SourceParameterSymbol.cs (1)
55
identifier.Parent.
GetLocation
());
Symbols\Synthesized\SynthesizedLocal.cs (1)
145
get { return (_syntaxOpt == null) ? ImmutableArray<Location>.Empty : ImmutableArray.Create(_syntaxOpt.
GetLocation
()); }
Symbols\Tuples\TupleTypeSymbol.cs (1)
510
diagnostics.Add(useSiteInfo, syntax?.
GetLocation
() ?? Location.None);
Symbols\TypeWithAnnotations.cs (1)
1049
diagnostics.Add(new LazyObsoleteDiagnosticInfo(type, binder.ContainingMemberOrLambda, binder.Flags), syntax.
GetLocation
());
Microsoft.CodeAnalysis.CSharp.CodeStyle (16)
ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
66
additionalLocations.Add(switchStatement.
GetLocation
());
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
261
localStatement.
GetLocation
(),
CSharpInlineDeclarationDiagnosticAnalyzer.cs (2)
227
invocationOrCreation.
GetLocation
());
237
reportNode.
GetLocation
(),
CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
118
additionalLocations: ImmutableArray.Create(declaration.
GetLocation
()),
CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
61
protected override Location GetLocation(IOperation operation) => operation.Syntax.
GetLocation
();
CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
47
ImmutableArray.Create(node.
GetLocation
()),
CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
106
return unusedDefinition.Syntax.
GetLocation
();
CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
88
ImmutableArray.Create(node.
GetLocation
()),
CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (2)
81
Descriptor, context.Operation.Syntax.
GetLocation
(), severity, additionalLocations: null, properties: null));
111
Descriptor, syntax.
GetLocation
(), severity, additionalLocations: null, properties: null));
UseExpressionBodyDiagnosticAnalyzer.cs (4)
96
? declaration.
GetLocation
()
99
var additionalLocations = ImmutableArray.Create(declaration.
GetLocation
());
111
? declaration.
GetLocation
()
118
var additionalLocations = ImmutableArray.Create(declaration.
GetLocation
());
UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
141
var additionalLocations = ImmutableArray.Create(syntaxNode.
GetLocation
());
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
14615
context.ReportDiagnostic(Diagnostic.Create(Hidden01, context.Node.
GetLocation
()));
14641
context.ReportDiagnostic(Diagnostic.Create(Info01, context.Node.
GetLocation
()));
14696
nodeContext.ReportDiagnostic(Diagnostic.Create(Error01, nodeContext.Node.
GetLocation
()));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (1)
39
c => c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.
GetLocation
())),
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (1)
39
c => c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.
GetLocation
())),
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (1)
39
c => c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.
GetLocation
())),
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
327
context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Node.
GetLocation
()));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (10)
Diagnostics\DiagnosticAnalyzerTests.cs (8)
253
var diag1 = CodeAnalysis.Diagnostic.Create(s_descriptor, context.Node.
GetLocation
(), "Attribute");
258
var diag2 = CodeAnalysis.Diagnostic.Create(s_descriptor, context.Node.
GetLocation
(), "ClassDeclaration");
263
var diag3 = CodeAnalysis.Diagnostic.Create(s_descriptor, context.Node.
GetLocation
(), "UsingDirective");
1654
nodeContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(ExpressionDescriptor, nodeContext.Node.
GetLocation
()));
3758
context => context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Rule, context.Node.
GetLocation
())),
3764
context => context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Rule, context.Node.
GetLocation
())),
3771
context => context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Rule, context.Operation.Syntax.
GetLocation
())),
3777
context => context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Rule, context.Operation.Syntax.
GetLocation
())),
Diagnostics\GetDiagnosticsTests.cs (2)
910
blockEndContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(DescriptorForBlockEnd, blockEndContext.CodeBlock.
GetLocation
()));
929
blockEndContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(DescriptorForBlockEnd, operationBlock.Syntax.
GetLocation
()));
Microsoft.CodeAnalysis.CSharp.Features (18)
Completion\CompletionProviders\OverrideCompletionProvider.cs (2)
217
return caretTarget.
GetLocation
().SourceSpan.End;
232
return firstAccessorStatement.
GetLocation
().SourceSpan.End;
ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
66
additionalLocations.Add(switchStatement.
GetLocation
());
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
261
localStatement.
GetLocation
(),
CSharpInlineDeclarationDiagnosticAnalyzer.cs (2)
227
invocationOrCreation.
GetLocation
());
237
reportNode.
GetLocation
(),
CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
118
additionalLocations: ImmutableArray.Create(declaration.
GetLocation
()),
CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
61
protected override Location GetLocation(IOperation operation) => operation.Syntax.
GetLocation
();
CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
47
ImmutableArray.Create(node.
GetLocation
()),
CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
106
return unusedDefinition.Syntax.
GetLocation
();
CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
88
ImmutableArray.Create(node.
GetLocation
()),
CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (2)
81
Descriptor, context.Operation.Syntax.
GetLocation
(), severity, additionalLocations: null, properties: null));
111
Descriptor, syntax.
GetLocation
(), severity, additionalLocations: null, properties: null));
UseExpressionBodyDiagnosticAnalyzer.cs (4)
96
? declaration.
GetLocation
()
99
var additionalLocations = ImmutableArray.Create(declaration.
GetLocation
());
111
? declaration.
GetLocation
()
118
var additionalLocations = ImmutableArray.Create(declaration.
GetLocation
());
UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
141
var additionalLocations = ImmutableArray.Create(syntaxNode.
GetLocation
());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\NullablePublicAPITests.cs (1)
1169
syntaxContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_descriptor1, syntaxContext.Node.
GetLocation
(), syntaxContext.Node, info.Nullability.FlowState, info.Nullability.Annotation, specInfo.Nullability.FlowState));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Rename\CSharpRenameRewriterLanguageService.cs (1)
1022
return ImmutableArray.Create(deconstructionLeft.
GetLocation
());
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (1)
Diagnostics\AbstractSuppressionAllCodeTests.cs (1)
171
context.ReportDiagnostic(Diagnostic.Create(_descriptor, node.
GetLocation
()));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
EditAndContinue\EditAndContinueTestHelpers.cs (1)
463
.OrderBy(partners => partners.Key.
GetLocation
().SourceSpan.Start)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (8)
1253
context.RegisterSyntaxTreeAction(c => c.ReportDiagnostic(Diagnostic.Create(s_syntaxRule, c.Tree.GetRoot().
GetLocation
())));
1254
context.RegisterSemanticModelAction(c => c.ReportDiagnostic(Diagnostic.Create(s_semanticRule, c.SemanticModel.SyntaxTree.GetRoot().
GetLocation
())));
1255
context.RegisterCompilationAction(c => c.ReportDiagnostic(Diagnostic.Create(s_compilationRule, c.Compilation.SyntaxTrees.First().GetRoot().
GetLocation
())));
1269
context.RegisterSyntaxTreeAction(c => c.ReportDiagnostic(Diagnostic.Create(s_syntaxRule, c.Tree.GetRoot().
GetLocation
())));
1270
context.RegisterSemanticModelAction(c => c.ReportDiagnostic(Diagnostic.Create(s_semanticRule, c.SemanticModel.SyntaxTree.GetRoot().
GetLocation
())));
1271
context.RegisterCompilationAction(c => c.ReportDiagnostic(Diagnostic.Create(s_compilationRule, c.Compilation.SyntaxTrees.First().GetRoot().
GetLocation
())));
1282
=> context.RegisterSyntaxTreeAction(c => c.ReportDiagnostic(Diagnostic.Create(s_syntaxRule, c.Tree.GetRoot().
GetLocation
())));
1364
return ImmutableArray.Create(Diagnostic.Create(s_syntaxRule, root.
GetLocation
()));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (8)
Diagnostics\DiagnosticServiceTests.vb (8)
851
Dim expectedLocation = document.GetSyntaxRootAsync().Result.
GetLocation
1735
context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.CodeBlock.
GetLocation
))
1757
context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.CodeBlock.
GetLocation
))
1784
context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Compilation.SyntaxTrees(0).GetRoot().
GetLocation
))
1860
context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor1, context.CodeBlock.
GetLocation
()))
1871
context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor2, context.Node.
GetLocation
()))
1875
context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor3, context.Node.
GetLocation
()))
1894
context.ReportDiagnostic(Diagnostic.Create(descriptor, context.Node.
GetLocation
))
Microsoft.CodeAnalysis.Features (73)
AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
122
var additionalLocations = ImmutableArray.Create(binaryLike.
GetLocation
());
AbstractConvertTypeOfToNameOfDiagnosticAnalyzer.cs (1)
46
var location = parent.
GetLocation
();
AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
84
nameSyntax.
GetLocation
(),
AbstractPopulateSwitchDiagnosticAnalyzer.cs (1)
67
additionalLocations: new[] { switchBlock.
GetLocation
() });
AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
82
additionalLocations: new[] { operation.Syntax.
GetLocation
() },
AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (3)
85
reportDiagnostic(Diagnostic.Create(s_invalidScopeDescriptor, attributeSyntax.
GetLocation
()));
92
reportDiagnostic(Diagnostic.Create(s_invalidOrMissingTargetDescriptor, attributeSyntax.
GetLocation
()));
115
reportDiagnostic(Diagnostic.Create(LegacyFormatTargetDescriptor, targetValueOperation.Syntax.
GetLocation
(), properties!, targetSymbolString));
AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
71
ImmutableArray.Create(node.
GetLocation
()));
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (2)
110
parenthesizedExpression.
GetLocation
());
130
var parenthesizedExpressionLocation = parenthesizedExpression.
GetLocation
();
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
667
var diagnostic = Diagnostic.Create(s_removeUnnecessarySuppressionDescriptor, attribute.
GetLocation
(), severity, additionalLocations: null, properties: null);
AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
183
value.Syntax.
GetLocation
(),
AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
142
conditionalExpression.
GetLocation
(),
AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (1)
70
additionalLocations: ImmutableArray.Create(interpolation.Syntax.
GetLocation
()),
AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
152
nextInvocation.Syntax.
GetLocation
(),
AbstractUseAutoPropertyAnalyzer.cs (4)
326
propertyDeclaration.
GetLocation
(),
327
variableDeclarator.
GetLocation
());
332
fieldNode.
GetLocation
(),
340
Descriptor, propertyDeclaration.
GetLocation
(),
AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (3)
123
expressionToCoalesce.
GetLocation
(),
124
ifStatement.
GetLocation
(),
125
whenTrueStatement.
GetLocation
()),
AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (4)
127
conditionalExpression.
GetLocation
(),
128
conditionExpression.
GetLocation
(),
129
whenPartToKeep.
GetLocation
());
133
conditionalExpression.
GetLocation
(),
AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (4)
124
conditionalExpression.
GetLocation
(),
125
conditionPartToCheck.
GetLocation
(),
126
whenPartToCheck.
GetLocation
());
130
conditionalExpression.
GetLocation
(),
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
121
var locations = ImmutableArray.Create(objectCreationExpression.
GetLocation
());
AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
151
additionalLocations: ImmutableArray.Create(assignment.
GetLocation
()),
162
additionalLocations: ImmutableArray.Create(assignment.
GetLocation
()),
173
additionalLocations: ImmutableArray.Create(assignment.
GetLocation
()),
AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
59
additionalLocations: ImmutableArray.Create(ifStatement.
GetLocation
()),
AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (2)
132
var additionalLocations = ImmutableArray.Create(invocation.
GetLocation
());
143
Descriptor, nameNode.
GetLocation
(),
AbstractUseNullPropagationDiagnosticAnalyzer.cs (4)
178
conditionalExpression.
GetLocation
(),
179
conditionPartToCheck.
GetLocation
(),
180
whenPartToCheck.
GetLocation
());
189
conditionalExpression.
GetLocation
(),
AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (3)
99
ifStatement.
GetLocation
(),
100
trueStatement.
GetLocation
(),
101
whenPartMatch.
GetLocation
()),
AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
108
var locations = ImmutableArray.Create(objectCreationExpression.
GetLocation
());
AbstractUseThrowExpressionDiagnosticAnalyzer.cs (5)
129
ifOperation.Syntax.
GetLocation
(),
130
throwOperation.Exception.Syntax.
GetLocation
(),
131
assignmentExpression.Value.Syntax.
GetLocation
(),
132
expressionStatement.Syntax.
GetLocation
());
135
DiagnosticHelper.Create(Descriptor, throwStatementSyntax.
GetLocation
(), option.Notification.Severity, additionalLocations: allLocations, properties: null));
ChangeSignature\DelegateInvokeMethodReferenceFinder.cs (1)
112
node.
GetLocation
(),
CodeLens\CodeLensFindReferenceProgress.cs (1)
94
select candidateSyntaxNode.
GetLocation
();
CodeLens\CodeLensReferencesService.cs (1)
279
var document = solution.GetDocument(syntaxNode.
GetLocation
().SourceTree);
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
86
context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptor, typeName.
GetLocation
(), typeName.ToString()));
ExtractMethod\MethodExtractor.CodeGenerator.cs (1)
127
afterThisLocation: previousMemberNode.
GetLocation
(),
ExtractMethod\MethodExtractor.cs (2)
159
var checkedStatus = await CheckTypeAsync(document.Document, context, context.
GetLocation
(), analyzeResult.ReturnType, cancellationToken).ConfigureAwait(false);
172
var location = contextNode.
GetLocation
();
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
154
new CodeGenerationContext(contextLocation: typeDeclaration.
GetLocation
()),
GenerateMember\GenerateParameterizedMember\AbstractGenerateConversionService.State.cs (1)
76
location = node.
GetLocation
();
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
565
new CodeGenerationContext(contextLocation: _state.SimpleName.
GetLocation
()),
ImplementAbstractClass\ImplementAbstractClassData.cs (1)
109
contextLocation: classNodeToAddMembersTo.
GetLocation
(),
ImplementInterface\AbstractImplementInterfaceService.CodeAction.cs (1)
212
contextLocation: classOrStructDecl.
GetLocation
(),
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (2)
582
return new CodeGenerationContext(afterThisLocation: symbolSyntax.
GetLocation
());
588
return new CodeGenerationContext(beforeThisLocation: symbolSyntax.
GetLocation
());
PreferFrameworkType\PreferFrameworkTypeDiagnosticAnalyzerBase.cs (1)
104
Descriptor, typeNode.
GetLocation
(),
SimplifyThisOrMe\AbstractSimplifyThisOrMeDiagnosticAnalyzer.cs (2)
76
Descriptor, thisExpression.
GetLocation
(), severity,
77
ImmutableArray.Create(memberAccessExpression.
GetLocation
()),
UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
66
nameNode.
GetLocation
(),
UseSystemHashCodeDiagnosticAnalyzer.cs (2)
73
var operationLocation = operation.Syntax.
GetLocation
();
74
var declarationLocation = context.OwningSymbol.DeclaringSyntaxReferences[0].GetSyntax(cancellationToken).
GetLocation
();
ValueTracking\ValueTracker.cs (1)
69
await progressCollector.TryReportAsync(document.Project.Solution, node.
GetLocation
(), symbol, cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTracker.OperationCollector.cs (1)
181
operation.Syntax.
GetLocation
(),
Microsoft.CodeAnalysis.Test.Utilities (88)
Diagnostics\BoxingOperationAnalyzer.cs (1)
79
context.ReportDiagnostic(Diagnostic.Create(BoxingDescriptor, boxingExpression.
GetLocation
()));
Diagnostics\CommonDiagnosticAnalyzers.cs (21)
70
var location = context.Tree.GetRoot().
GetLocation
();
106
var expectedLineSpan = root.
GetLocation
().GetLineSpan();
180
var expectedLineSpan = root.
GetLocation
().GetLineSpan();
257
var expectedLineSpan = root.
GetLocation
().GetLineSpan();
306
var expectedLineSpan = root.
GetLocation
().GetLineSpan();
572
syntaxNodeContext.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptor, syntaxNodeContext.Node.
GetLocation
()));
602
context.ReportDiagnostic(Diagnostic.Create(Rule, context.Node.
GetLocation
()));
642
context.ReportDiagnostic(Diagnostic.Create(Rule, context.Node.
GetLocation
()));
857
_invalidLocation = treeInAnotherCompilation.GetRoot().
GetLocation
();
995
context.ReportDiagnostic(Diagnostic.Create(Descriptor, tree.GetRoot().
GetLocation
()));
1243
ReportDiagnostic(operationContext.ReportDiagnostic, operationContext.Operation.Syntax.
GetLocation
());
1255
ReportDiagnostic(operationContext.ReportDiagnostic, operationContext.Operation.Syntax.
GetLocation
());
1335
var diagnostic = Diagnostic.Create(Descriptor, operation.Syntax.
GetLocation
(), operation.Field.Name, operation.Field.ConstantValue);
1356
var diagnostic = Diagnostic.Create(Descriptor, operationContext.Operation.Syntax.
GetLocation
(), operationContext.ContainingSymbol.Name);
2526
context.ReportDiagnostic(Diagnostic.Create(s_descriptor, context.Tree.GetRoot().
GetLocation
()));
2556
context => context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Node.
GetLocation
())),
2562
context => context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Operation.Syntax.
GetLocation
())),
2608
context.RegisterSyntaxTreeAction(syntaxContext => HandleCallback(syntaxContext.Tree.GetRoot().
GetLocation
(), context.Compilation, syntaxContext.ReportDiagnostic, syntaxContext.CancellationToken));
2611
context.RegisterSyntaxNodeAction(context => HandleCallback(context.Node.
GetLocation
(), context.Compilation, context.ReportDiagnostic, context.CancellationToken), CodeAnalysis.CSharp.SyntaxKind.ClassDeclaration);
2617
context.RegisterOperationAction(context => HandleCallback(context.Operation.Syntax.
GetLocation
(), context.Compilation, context.ReportDiagnostic, context.CancellationToken), OperationKind.VariableDeclaration);
2620
context.RegisterSemanticModelAction(context => HandleCallback(context.SemanticModel.SyntaxTree.GetRoot().
GetLocation
(), context.SemanticModel.Compilation, context.ReportDiagnostic, context.CancellationToken));
Diagnostics\EmptyArrayAnalyzer.cs (1)
56
context.ReportDiagnostic(Diagnostic.Create(UseArrayEmptyDescriptor, arrayCreationExpression.
GetLocation
()));
Diagnostics\OperationTestAnalyzer.cs (63)
59
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidStatementDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
63
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidExpressionDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
73
operationContext.ReportDiagnostic(Diagnostic.Create(IsInvalidDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
109
operationContext.ReportDiagnostic(Diagnostic.Create(ExpressionDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
288
context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.
GetLocation
()));
484
context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.
GetLocation
()));
549
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidArgumentDescriptor, argument.Syntax.
GetLocation
()));
555
operationContext.ReportDiagnostic(Diagnostic.Create(UseDefaultArgumentDescriptor, invocation.Syntax.
GetLocation
(), argument.Parameter.Name));
601
context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.
GetLocation
()));
635
operationContext.ReportDiagnostic(Diagnostic.Create(SeventeenDescriptor, literal.Syntax.
GetLocation
()));
678
context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.
GetLocation
()));
724
context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.
GetLocation
()));
765
context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.
GetLocation
()));
805
context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.
GetLocation
()));
862
context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.
GetLocation
()));
923
context.ReportDiagnostic(Diagnostic.Create(descriptor, syntax.
GetLocation
()));
955
instanceReference.Syntax.
GetLocation
()));
1034
operationContext.ReportDiagnostic(Diagnostic.Create(EventReferenceDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
1042
operationContext.ReportDiagnostic(Diagnostic.Create(eventAssignment.Adds ? HandlerAddedDescriptor : HandlerRemovedDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
1046
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidEventDescriptor, eventAssignment.Syntax.
GetLocation
()));
1054
operationContext.ReportDiagnostic(Diagnostic.Create(PropertyReferenceDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
1061
operationContext.ReportDiagnostic(Diagnostic.Create(FieldReferenceDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
1068
operationContext.ReportDiagnostic(Diagnostic.Create(MethodBindingDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
1111
operationContext.ReportDiagnostic(Diagnostic.Create(LongParamsDescriptor, argument.Value.Syntax.
GetLocation
()));
1126
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidConstructorDescriptor, creation.Syntax.
GetLocation
()));
1138
operationContext.ReportDiagnostic(Diagnostic.Create(LongParamsDescriptor, argument.Value.Syntax.
GetLocation
()));
1184
operationContext.ReportDiagnostic(Diagnostic.Create(EqualsValueDescriptor, equalsValue.Syntax.
GetLocation
()));
1195
operationContext.ReportDiagnostic(Diagnostic.Create(EqualsValueDescriptor, equalsValue.Syntax.
GetLocation
()));
1226
operationContext.ReportDiagnostic(Diagnostic.Create(NoneOperationDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
1262
operationContext.ReportDiagnostic(Diagnostic.Create(AddressOfDescriptor, addressOfOperation.Syntax.
GetLocation
()));
1266
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidAddressOfReferenceDescriptor, addressOfOperation.Reference.Syntax.
GetLocation
()));
1314
operationContext.ReportDiagnostic(Diagnostic.Create(LambdaExpressionDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
1323
operationContext.ReportDiagnostic(Diagnostic.Create(TooManyStatementsInLambdaExpressionDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
1336
operationContext.ReportDiagnostic(Diagnostic.Create(NoneOperationInLambdaExpressionDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
1408
operationContext.ReportDiagnostic(Diagnostic.Create(StaticMemberDescriptor, operation.Syntax.
GetLocation
()));
1412
operationContext.ReportDiagnostic(Diagnostic.Create(StaticMemberWithInstanceDescriptor, operation.Syntax.
GetLocation
()));
1452
operationContext.ReportDiagnostic(Diagnostic.Create(LabelDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
1466
operationContext.ReportDiagnostic(Diagnostic.Create(GotoDescriptor, branch.Syntax.
GetLocation
()));
1518
operationContext.ReportDiagnostic(Diagnostic.Create(OperatorAddMethodDescriptor, binary.Syntax.
GetLocation
()));
1523
operationContext.ReportDiagnostic(Diagnostic.Create(DoubleMultiplyDescriptor, binary.Syntax.
GetLocation
()));
1534
operationContext.ReportDiagnostic(Diagnostic.Create(OperatorMinusMethodDescriptor, unary.Syntax.
GetLocation
()));
1539
operationContext.ReportDiagnostic(Diagnostic.Create(BooleanNotDescriptor, unary.Syntax.
GetLocation
()));
1544
operationContext.ReportDiagnostic(Diagnostic.Create(BooleanNotDescriptor, unary.Syntax.
GetLocation
()));
1574
binary.Syntax.
GetLocation
(),
1627
binary.Syntax.
GetLocation
(),
1651
unary.Syntax.
GetLocation
(),
1707
paramsarrayArgumentOperation.Syntax.
GetLocation
()));
1791
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidBinaryDescriptor, binary.Syntax.
GetLocation
()));
1799
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidUnaryDescriptor, unary.Syntax.
GetLocation
()));
1807
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidIncrementDescriptor, inc.Syntax.
GetLocation
()));
1848
operationContext.ReportDiagnostic(Diagnostic.Create(ConditionalAccessOperationDescriptor, conditionalAccess.Syntax.
GetLocation
()));
1857
operationContext.ReportDiagnostic(Diagnostic.Create(ConditionalAccessInstanceOperationDescriptor, conditionalAccessInstance.Syntax.
GetLocation
()));
1897
operationContext.ReportDiagnostic(Diagnostic.Create(InvalidConversionExpressionDescriptor, conversion.Syntax.
GetLocation
()));
1935
operationContext.ReportDiagnostic(Diagnostic.Create(ForLoopConditionCrashDescriptor, forLoop.LimitValue.Syntax.
GetLocation
()));
1974
operationContext.ReportDiagnostic(Diagnostic.Create(UnaryTrueDescriptor, unary.Syntax.
GetLocation
()));
1978
operationContext.ReportDiagnostic(Diagnostic.Create(UnaryFalseDescriptor, unary.Syntax.
GetLocation
()));
2015
operationContext.ReportDiagnostic(Diagnostic.Create(AssignmentOperationDescriptor, operationContext.Operation.Syntax.
GetLocation
()));
2023
syntaxContext.ReportDiagnostic(Diagnostic.Create(AssignmentSyntaxDescriptor, syntaxContext.Node.
GetLocation
()));
2052
operationContext.ReportDiagnostic(Diagnostic.Create(LiteralDescriptor, literal.Syntax.
GetLocation
(), literal.Syntax.ToString()));
2080
Diagnostic.Create(OperationActionDescriptor, operationContext.Operation.Syntax.
GetLocation
(), "Operation", "Analysis"));
2111
Diagnostic.Create(OperationActionDescriptor, operationContext.Operation.Syntax.
GetLocation
(), "Operation", "CompilationStart within Analysis"));
2143
syntaxContext.ReportDiagnostic(Diagnostic.Create(GetOperationDescriptor, node.
GetLocation
()));
2155
syntaxContext.ReportDiagnostic(Diagnostic.Create(GetOperationDescriptor, node.
GetLocation
()));
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (2)
160
context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.Node.
GetLocation
(), messageArgs: context.Node.ToFullString()));
179
context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.Node.
GetLocation
(), messageArgs: context.Node.ToFullString()));
Microsoft.CodeAnalysis.VisualBasic (49)
Analysis\FlowAnalysis\ControlFlowPass.vb (1)
141
Me.diagnostics.Add(ERRID.ERR_BadYieldInTryHandler, branch.Branch.Syntax.
GetLocation
)
Analysis\FlowAnalysis\DataFlowPass.vb (2)
1207
Me.diagnostics.Add(warning, node.
GetLocation
(), If(sym.Name, "dummy"))
1304
Me.diagnostics.Add(warning, node.
GetLocation
(), localName)
Analysis\ForLoopVerification.vb (2)
81
controlVariable.Syntax.
GetLocation
(),
115
nextVariable.Syntax.
GetLocation
(),
Analysis\IteratorAndAsyncAnalysis\IteratorAndAsyncCaptureWalker.vb (1)
72
diagnostics.Add(ERRID.ERR_CannotLiftRestrictedTypeResumable1, node.
GetLocation
(), type)
Binding\Binder.vb (1)
993
diagnostics.Add(info, node.
GetLocation
())
Binding\Binder_Delegates.vb (1)
1162
Dim addressOfLocation As Location = syntaxNode.
GetLocation
()
Binding\Binder_Invocation.vb (5)
1306
Return result.
GetLocation
()
1309
Return node.
GetLocation
()
1315
Return node.
GetLocation
()
1324
Return result.
GetLocation
()
1338
Return result.
GetLocation
()
Binding\Binder_Lambda.vb (2)
810
parameterDescriptors(i) = New AnonymousTypeField(returnParamName, returnType, source.Syntax.
GetLocation
(), False)
812
Dim typeDescriptor As New AnonymousTypeDescriptor(parameterDescriptors.AsImmutableOrNull(), source.Syntax.
GetLocation
(), True)
Binding\Binder_Query.vb (1)
3230
fields(j) = New AnonymousTypeField(param.Name, param.Type, param.Syntax.
GetLocation
(), isKeyOrByRef:=True)
Binding\Binder_Statements.vb (1)
4289
diagnostics.Add(New VBDiagnostic(result.Diagnostic, syntax.
GetLocation
()))
Compilation\DocumentationComments\DocumentationCommentWalker.vb (1)
251
Me._diagnostics.Add(ERRID.WRN_XMLDocCrefAttributeNotFound1, node.
GetLocation
(), strValue.Trim())
Emit\NoPia\EmbeddedEvent.vb (1)
91
diagnostics.Add(If(syntaxNodeOpt Is Nothing, NoLocation.Singleton, syntaxNodeOpt.
GetLocation
()), useSiteInfo.Diagnostics)
Emit\NoPia\EmbeddedTypesManager.vb (1)
277
diagnostics.Add(New VBDiagnostic(info, If(syntaxNodeOpt Is Nothing, NoLocation.Singleton, syntaxNodeOpt.
GetLocation
())))
Emit\PEModuleBuilder.vb (1)
604
Binder.ReportDiagnostic(diagnostics, If(syntaxNodeOpt IsNot Nothing, syntaxNodeOpt.
GetLocation
(), NoLocation.Singleton), info.DiagnosticInfo)
Emit\SymbolTranslator.vb (2)
146
If(syntaxNodeOpt Is Nothing, NoLocation.Singleton, syntaxNodeOpt.
GetLocation
())))
226
Dim location = If(syntaxNodeOpt Is Nothing, NoLocation.Singleton, syntaxNodeOpt.
GetLocation
())
Errors\DiagnosticBagExtensions.vb (1)
72
Return Not useSiteDiagnostics.IsNullOrEmpty AndAlso diagnostics.Add(node.Syntax.
GetLocation
, useSiteDiagnostics)
Lowering\AsyncRewriter\AsyncRewriter.vb (2)
568
Me.F.Syntax.
GetLocation
())
626
Me.F.Syntax.
GetLocation
())
Lowering\Diagnostics\DiagnosticsPass_ExpressionLambdas.vb (1)
402
Me._diagnostics.Add(New VBDiagnostic(ErrorFactory.ErrorInfo(code), node.Syntax.
GetLocation
()))
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (2)
181
Me.Diagnostics.Add(New VBDiagnostic(ErrorFactory.ErrorInfo(code, args), node.Syntax.
GetLocation
()))
852
Me._factory.Syntax.
GetLocation
())
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (3)
94
Return syntax.
GetLocation
().GetMappedLineSpan().IsValid
436
Return GetSourceDocument(debugDocumentProvider, syntax, syntax.
GetLocation
().GetMappedLineSpan())
454
Return AddAnalysisPoint(syntaxForSpan, syntaxForSpan.
GetLocation
().GetMappedLineSpan(), statementFactory)
Lowering\LambdaRewriter\LambdaRewriter.Analysis.vb (2)
459
_diagnostics.Add(ERRID.ERR_CannotLiftRestrictedTypeQuery, syntax.
GetLocation
(), type)
461
_diagnostics.Add(ERRID.ERR_CannotLiftRestrictedTypeLambda, syntax.
GetLocation
(), type)
Lowering\LambdaRewriter\LambdaRewriter.vb (3)
432
diagnostics.Add(useSiteError, syntaxNode.
GetLocation
())
1345
Me.Diagnostics.Add(ERRID.ERR_CannotGotoNonScopeBlocksWithClosure, node.Syntax.
GetLocation
(),
1348
Me.Diagnostics.Add(ERRID.ERR_CannotGotoNonScopeBlocksWithClosure, node.Syntax.
GetLocation
(), "Goto ", label.Name, label.Name)
Lowering\LambdaRewriter\SynthesizedLambdaMethod.vb (1)
63
Me._locations = ImmutableArray.Create(lambdaNode.Syntax.
GetLocation
())
Lowering\LocalRewriter\LocalRewriter.vb (2)
655
diagnostics.Add(New VBDiagnostic(diagnostic, node.Syntax.
GetLocation
()))
659
Return diagnostics.Add(useSiteInfo, node.Syntax.
GetLocation
())
Lowering\LocalRewriter\LocalRewriter_LateAddressOf.vb (1)
45
Dim addressOfLocation As Location = syntaxNode.
GetLocation
()
Lowering\LocalRewriter\LocalRewriter_LateBindingHelpers.vb (2)
977
Binder.ReportUseSite(_diagnostics, syntax.
GetLocation
(), useSiteInfo)
999
If Binder.ReportUseSite(_diagnostics, syntax.
GetLocation
(), useSiteInfo) Then
Lowering\LocalRewriter\LocalRewriter_RaiseEvent.vb (1)
162
_diagnostics.Add(info, syntax.
GetLocation
())
Lowering\MethodToClassRewriter\MethodToClassRewriter.MyBaseMyClassWrapper.vb (1)
174
Me._locations = ImmutableArray.Create(Of Location)(syntax.
GetLocation
())
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.vb (1)
40
Me._locations = ImmutableArray.Create(syntax.
GetLocation
())
Symbols\Source\LambdaSymbol.vb (1)
256
Return ImmutableArray.Create(_syntaxNode.
GetLocation
())
Symbols\SynthesizedSymbols\SynthesizedLocal.vb (1)
36
Return If(_syntaxOpt Is Nothing, ImmutableArray(Of Location).Empty, ImmutableArray.Create(_syntaxOpt.
GetLocation
()))
Symbols\Tuples\TupleTypeSymbol.vb (1)
652
diagnostics.Add(useSiteInfo, syntax.
GetLocation
())
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
VisualBasicConsecutiveStatementPlacementDiagnosticAnalyzer.vb (1)
44
Return block.
GetLocation
()
VisualBasicQualifyMemberAccessDiagnosticAnalyzer.vb (1)
46
Return operation.Syntax.
GetLocation
()
VisualBasicRemoveUnusedParametersAndValuesDiagnosticAnalyzer.vb (1)
72
Return unusedDefinition.Syntax.
GetLocation
()
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (3)
CommandLineTests.vb (3)
10628
context.ReportDiagnostic(Diagnostic.Create(Hidden01, context.Node.
GetLocation
()))
10653
context.ReportDiagnostic(Diagnostic.Create(Info01, context.Node.
GetLocation
()))
10704
context.ReportDiagnostic(Diagnostic.Create(Error01, context.Node.
GetLocation
()))
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (1)
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (1)
35
Sub(c) c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.
GetLocation
())),
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler (3)
Rewriters\CapturedVariableRewriter.vb (1)
158
_diagnostics.Add(New VBDiagnostic(ErrorFactory.ErrorInfo(ERRID.ERR_UseOfKeywordNotInInstanceMethod1, syntax.ToString()), syntax.
GetLocation
()))
Symbols\PlaceholderLocalSymbol.vb (2)
126
diagnostics.Add(type.GetUseSiteInfo().DiagnosticInfo, syntax.
GetLocation
())
129
diagnostics.Add(exprType.GetUseSiteInfo().DiagnosticInfo, syntax.
GetLocation
())
Microsoft.CodeAnalysis.VisualBasic.Features (5)
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (2)
173
Dim expectedLine = nodes.First().
GetLocation
().GetLineSpan().StartLinePosition.Line
175
Dim actualLine = node.
GetLocation
().GetLineSpan().StartLinePosition.Line
VisualBasicConsecutiveStatementPlacementDiagnosticAnalyzer.vb (1)
44
Return block.
GetLocation
()
VisualBasicQualifyMemberAccessDiagnosticAnalyzer.vb (1)
46
Return operation.Syntax.
GetLocation
()
VisualBasicRemoveUnusedParametersAndValuesDiagnosticAnalyzer.vb (1)
72
Return unusedDefinition.Syntax.
GetLocation
()
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Diagnostics\DiagnosticAnalyzerTests.vb (2)
279
context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(desc1, context.Node.
GetLocation
))
962
nodeContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(ExpressionDescriptor, nodeContext.Node.
GetLocation
()))
Diagnostics\GetDiagnosticsTests.vb (2)
632
context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(DescriptorForBlockEnd, context.CodeBlock.
GetLocation
()))
646
context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(DescriptorForBlockEnd, operationBlock.Syntax.
GetLocation
()))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (4)
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (4)
323
tree.GetRoot().FindToken(sub2).Parent.Parent.
GetLocation
,
333
tree.GetRoot().FindToken(sub4).Parent.Parent.
GetLocation
,
390
tree.GetRoot().FindToken(sub1).Parent.Parent.
GetLocation
,
401
tree.GetRoot().FindToken(sub2).Parent.Parent.
GetLocation
,
Microsoft.CodeAnalysis.Workspaces (3)
Editing\SymbolEditorExtensions.cs (1)
73
typeRef.
GetLocation
(),
FindSymbols\FindReferences\Finders\FinderLocation.cs (1)
21
/// cref="SyntaxNode.
GetLocation
"/>. Instead, this location is where we want to navigate
SymbolKey.BodyLevelSymbolKey.cs (1)
34
result.Add(syntaxRef.GetSyntax(cancellationToken).
GetLocation
());