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