491 references to GetLocation
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.DetectInvalidModelNames.cs (1)
32context.ReportDiagnostic(Diagnostic.Create(Diagnostics.s_modelNameMustBeValid, token.GetLocation(), validationMessage));
GenerateDocumentationAndConfigFiles (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Metrics (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Metrics.Legacy (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Microsoft.AspNetCore.App.Analyzers (4)
Mvc\DetectAmbiguousActionRoutes.cs (1)
44ambiguousActionRoute.RouteUsageModel.UsageContext.RouteToken.GetLocation(),
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (2)
515? parentOpt.Value.GetLocation().SourceSpan.Start 518? parentOpt.Value.GetLocation().SourceSpan.End
RouteHandlers\DetectAmbiguousRoutes.cs (1)
42model.UsageContext.RouteToken.GetLocation(),
Microsoft.CodeAnalysis (3)
Binding\BindingDiagnosticBag.cs (2)
215=> Add(useSiteInfo, static token => token.GetLocation(), token); 280=> Add(useSiteInfo, static token => token.GetLocation(), token);
Syntax\SyntaxNodeOrToken.cs (1)
833return token.GetLocation();
Microsoft.CodeAnalysis.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Microsoft.CodeAnalysis.CodeStyle (19)
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
70name.GetLocation(),
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
179operatorToken.GetLocation(),
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
146node.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
111additionalLocations: [nextToken.GetLocation()],
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
81additionalLocations: [token.GetLocation()],
src\Analyzers\Core\Analyzers\OrderModifiers\AbstractOrderModifiersDiagnosticAnalyzer.cs (1)
93DiagnosticHelper.Create(Descriptor, modifiers.First().GetLocation(), notificationOption, context.Options, additionalLocations: null, properties: null));
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (1)
38=> switchBlock.GetFirstToken().GetLocation();
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
113operatorToken.GetLocation(), 114additionalLocations: [operatorToken.GetLocation()],
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (2)
110parenthesizedExpression.GetFirstToken().GetLocation(), 111parenthesizedExpression.GetLastToken().GetLocation());
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
114ifStatement.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
188objectCreationExpression.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
160assignmentToken.GetLocation(), 180assignmentToken.GetLocation(), 193assignmentToken.GetLocation(),
src\Analyzers\Core\Analyzers\UseConditionalExpression\AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
54ifStatement.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
49ifStatement.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
130objectCreationExpression.GetFirstToken().GetLocation(),
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (2)
446new CodeGenerationContext(Token.GetLocation())); 492new CodeGenerationContext(Token.GetLocation())),
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
37contextLocation: _state.IdentifierToken.GetLocation())),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
74afterThisLocation: _state.IdentifierToken.GetLocation(),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
51return IdentifierToken.GetLocation();
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
57contextLocation: _state.IdentifierToken.GetLocation()));
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
63var context = new CodeGenerationContext(beforeThisLocation: _state.IdentifierToken.GetLocation());
Microsoft.CodeAnalysis.CSharp (194)
Binder\Binder.cs (2)
551diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code), token.GetLocation())); 556diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code, args), token.GetLocation()));
Binder\Binder.QueryTranslationState.cs (2)
75var result = new RangeVariableSymbol(name, binder.ContainingMemberOrLambda, identifier.GetLocation()); 85diagnostics.Add(ErrorCode.ERR_QueryDuplicateRangeVariable, identifier.GetLocation(), name);
Binder\Binder_AnonymousTypes.cs (1)
106AnonymousTypeDescriptor descriptor = new AnonymousTypeDescriptor(fields.AsImmutableOrNull(), node.NewKeyword.GetLocation());
Binder\Binder_Constraints.cs (4)
202diagnostics.Add(ErrorCode.ERR_NewBoundWithVal, syntax.GetFirstToken().GetLocation()); 206diagnostics.Add(ErrorCode.ERR_NewBoundWithUnmanaged, syntax.GetFirstToken().GetLocation()); 211diagnostics.Add(ErrorCode.ERR_NewBoundMustBeLast, syntax.GetFirstToken().GetLocation()); 305diagnostics.Add(ErrorCode.ERR_AllowsClauseMustBeLast, syntax.GetFirstToken().GetLocation());
Binder\Binder_Conversions.cs (1)
1196((ParameterSyntax)node).Modifiers.First(static m => m.IsKind(SyntaxKind.ParamsKeyword)).GetLocation(),
Binder\Binder_Deconstruct.cs (5)
825diagnostics.Add(ErrorCode.ERR_ScopedDiscard, scopedType.ScopedKeyword.GetLocation()); 831diagnostics.Add(ErrorCode.ERR_DeconstructVariableCannotBeByRef, refType.RefKeyword.GetLocation()); 891diagnostics.Add(ErrorCode.ERR_DeconstructVariableCannotBeByRef, refType.RefKeyword.GetLocation()); 935diagnostics.Add(ErrorCode.ERR_UnexpectedToken, scopedType.ScopedKeyword.GetLocation(), scopedType.ScopedKeyword.ValueText); 941diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refType.RefKeyword.GetLocation(), refType.RefKeyword.ValueText);
Binder\Binder_Expressions.cs (16)
302diagnostics.Add(ErrorCode.ERR_SwitchExpressionNoBestType, exprSyntax.SwitchKeyword.GetLocation()); 859diagnostics.Add(ErrorCode.ERR_UnexpectedToken, firstToken.GetLocation(), firstToken.ValueText); 868diagnostics.Add(ErrorCode.ERR_UnexpectedToken, firstToken.GetLocation(), firstToken.ValueText); 875diagnostics.Add(ErrorCode.ERR_UnexpectedToken, firstToken.GetLocation(), firstToken.ValueText); 886diagnostics.Add(ErrorCode.ERR_ThrowMisplaced, node.ThrowKeyword.GetLocation()); 3165diagnostics.Add(ErrorCode.ERR_ScopedDiscard, scopedType.ScopedKeyword.GetLocation()); 3260diagnostics.Add(ErrorCode.ERR_UnexpectedToken, scopedType.ScopedKeyword.GetLocation(), scopedType.ScopedKeyword.ValueText); 3266diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refType.RefKeyword.GetLocation(), refType.RefKeyword.ValueText); 4916errorLocation = initializerSyntax.ThisOrBaseKeyword.GetLocation(); 5263MessageID.IDS_FeatureCollectionExpressions.CheckFeatureAvailability(diagnostics, syntax, syntax.OpenBracketToken.GetLocation()); 6230BaseObjectCreationExpressionSyntax { NewKeyword: { } newKeyword } => newKeyword.GetLocation(), 7689diagnostics.Add(ErrorCode.ERR_BadUnaryOp, operatorToken.GetLocation(), SyntaxFacts.GetText(operatorToken.Kind()), leftType); 7697diagnostics.Add(new CSDiagnostic(diagnosticInfo, operatorToken.GetLocation())); 11521Error(diagnostics, ErrorCode.ERR_BadUnaryOp, operatorToken.GetLocation(), operatorToken.Text, receiver.Display); 11528Error(diagnostics, ErrorCode.ERR_BadUnaryOp, operatorToken.GetLocation(), operatorToken.Text, receiverType); 11535Error(diagnostics, ErrorCode.ERR_BadUnaryOp, operatorToken.GetLocation(), operatorToken.Text, receiverType);
Binder\Binder_InterpolatedString.cs (2)
36node.StringStartToken.GetLocation(), 84interpolation.CloseBraceToken.GetLocation(),
Binder\Binder_Lambda.cs (3)
198paramsKeyword.GetLocation()); 336parameter.Identifier.GetLocation()); 344parameter.Identifier.GetLocation(), parameter.Identifier.Text);
Binder\Binder_Operators.cs (4)
523binder: this, location: node.OperatorToken.GetLocation(), nodeOpt: node, diagnostics: diagnostics, name: node.OperatorToken.ValueText, 3477binder: this, location: operatorToken.GetLocation(), nodeOpt: node, diagnostics: diagnostics, name: operatorToken.ValueText, 5707diagnostics.Add(ErrorCode.ERR_RefConditionalNeedsTwoRefs, whenFalse.GetFirstToken().GetLocation()); 5712diagnostics.Add(ErrorCode.ERR_RefConditionalNeedsTwoRefs, whenTrue.GetFirstToken().GetLocation());
Binder\Binder_Patterns.cs (3)
883diagnostics.Add(ErrorCode.ERR_DesignatorBeneathPatternCombinator, identifier.GetLocation()); 1336diagnostics.Add(ErrorCode.ERR_VarMayNotBindToType, node.VarKeyword.GetLocation(), foundSymbol.ToDisplayString()); 1639diagnostics.Add(ErrorCode.ERR_InvalidExprTerm, node.OperatorToken.GetLocation(), node.OperatorToken.Text);
Binder\Binder_QueryErrors.cs (1)
210symbols), queryClause.GetFirstToken().GetLocation());
Binder\Binder_Statements.cs (9)
446diagnostics.Add(ErrorCode.ERR_BadEmptyThrow, node.ThrowKeyword.GetLocation()); 457diagnostics.Add(ErrorCode.ERR_BadEmptyThrowInFinally, node.ThrowKeyword.GetLocation()); 2032LambdaExpressionSyntax lambda => lambda.ArrowToken.GetLocation(), 2033AnonymousMethodExpressionSyntax anonymousMethod => anonymousMethod.DelegateKeyword.GetLocation(), 3050diagnostics.Add(ErrorCode.ERR_ReturnInIterator, syntax.ReturnKeyword.GetLocation()); 3058diagnostics.Add(ErrorCode.ERR_MustNotHaveRefReturn, syntax.ReturnKeyword.GetLocation()); 3063diagnostics.Add(ErrorCode.ERR_ReturnInIterator, syntax.ReturnKeyword.GetLocation()); 3072diagnostics.Add(errorCode, syntax.ReturnKeyword.GetLocation()); 3262diagnostics.Add(ErrorCode.ERR_TooManyCatches, catchSyntax.CatchKeyword.GetLocation());
Binder\Binder_Symbols.cs (5)
497diagnostics.Add(ErrorCode.ERR_BadRefInUsingAlias, refToken.GetLocation()); 501diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refToken.GetLocation(), refToken.ToString()); 515diagnostics.Add(ErrorCode.ERR_UnexpectedToken, scopedToken.GetLocation(), scopedToken.ToString()); 714locations.Add(nameToken.GetLocation()); 2799=> CheckFeatureAvailability(syntax.SyntaxTree!, feature, diagnostics, syntax, static syntax => syntax.GetLocation(), forceWarning: forceWarning);
Binder\BindingDiagnosticBag.cs (2)
102return ReportUseSite(symbol, static token => token.GetLocation(), token); 165=> Add(code, syntax.GetLocation()!, args);
Binder\ForEachLoopBinder.cs (3)
499diagnostics.Add(ErrorCode.ERR_AmbigUDConv, foreachKeyword.GetLocation(), originalUserDefinedConversions[0], originalUserDefinedConversions[1], inferredType.Type, iterationVariableType); 504diagnostics.Add(ErrorCode.ERR_NoExplicitConv, foreachKeyword.GetLocation(), distinguisher.First, distinguisher.Second); 521var location = _syntax.ForEachKeyword.GetLocation();
Binder\LocalBinderFactory.cs (1)
455if (candidate.GetFirstLocation() == node.Identifier.GetLocation())
Binder\SwitchBinder_Patterns.cs (1)
35diagnostics.Add(ErrorCode.WRN_EmptySwitch, node.OpenBraceToken.GetLocation());
Binder\SwitchExpressionBinder.cs (1)
103node.SwitchKeyword.GetLocation(),
Binder\WithLambdaParametersBinder.cs (1)
82diagnostics.Add(ErrorCode.ERR_YieldInAnonMeth, node.YieldKeyword.GetLocation());
BoundTree\BoundTreeVisitors.cs (1)
192return syntax.GetFirstToken().GetLocation();
BoundTree\UnboundLambda.cs (3)
1537return ((SimpleLambdaExpressionSyntax)syntax).Parameter.Identifier.GetLocation(); 1539return ((ParenthesizedLambdaExpressionSyntax)syntax).ParameterList.Parameters[index].Identifier.GetLocation(); 1541return ((AnonymousMethodExpressionSyntax)syntax).ParameterList!.Parameters[index].Identifier.GetLocation();
CommandLine\CSharpCompiler.cs (1)
365directive.File.GetLocation(),
Compilation\SyntaxAndDeclarationManager.cs (2)
232fileToken.GetLocation(), 267fileToken.GetLocation());
Compiler\MethodCompiler.cs (1)
1900constructorSyntax.Initializer.ThisOrBaseKeyword.GetLocation(),
Declarations\DeclarationTreeBuilder.cs (14)
196bag.Add(ErrorCode.ERR_SimpleProgramIsEmpty, ((EmptyStatementSyntax)firstGlobalStatement.Statement).SemicolonToken.GetLocation()); 450diagnostics.Add(ErrorCode.ERR_GlobalUsingOutOfOrder, directive.GlobalKeyword.GetLocation()); 481MessageID.IDS_FeatureUsingStatic.CheckFeatureAvailability(diagnostics, usingDirective, usingDirective.StaticKeyword.GetLocation()); 484MessageID.IDS_FeatureGlobalUsing.CheckFeatureAvailability(diagnostics, usingDirective, usingDirective.GlobalKeyword.GetLocation()); 491MessageID.IDS_FeatureExternAlias.CheckFeatureAvailability(diagnostics, externAlias, externAlias.ExternKeyword.GetLocation()); 529MessageID.IDS_FeatureFileScopedNamespace.CheckFeatureAvailability(diagnostics, node, node.NamespaceKeyword.GetLocation()); 597diagnostics.Add(ErrorCode.ERR_BadModifiersOnNamespace, node.Modifiers[0].GetLocation()); 604diagnostics.Add(ErrorCode.ERR_GlobalUsingInNamespace, directive.GlobalKeyword.GetLocation()); 734MessageID.IDS_FeatureRecordStructs.CheckFeatureAvailability(diagnostics, record, record.ClassOrStructKeyword.GetLocation()); 752MessageID.IDS_FeaturePrimaryConstructors.CheckFeatureAvailability(diagnostics, node, node.SemicolonToken.GetLocation()); 763MessageID.IDS_FeatureStaticClasses.CheckFeatureAvailability(diagnostics, node, modifier.GetLocation()); 767MessageID.IDS_FeatureReadOnlyStructs.CheckFeatureAvailability(diagnostics, node, modifier.GetLocation()); 771MessageID.IDS_FeatureRefStructs.CheckFeatureAvailability(diagnostics, node, modifier.GetLocation()); 859MessageID.IDS_FeaturePrimaryConstructors.CheckFeatureAvailability(diagnostics, node, node.SemicolonToken.GetLocation());
Errors\DiagnosticBagExtensions.cs (1)
78return !useSiteDiagnostics.IsNullOrEmpty() && diagnostics.Add(token.GetLocation(), useSiteDiagnostics);
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
48var location = questionToken.GetLocation();
Errors\MessageID.cs (2)
381static tuple => tuple.location ?? tuple.syntax.GetLocation(), 409static tuple => tuple.location ?? tuple.syntax.GetLocation(),
FlowAnalysis\NullableWalker.cs (6)
1162Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false"); 1326location = blockSyntax.CloseBraceToken.GetLocation(); 1330location = syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(); 1416var location = syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(); 1439ReportDiagnostic(ErrorCode.WRN_ShouldNotReturn, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation()); 11890ForEachStatementSyntax statement => statement.Identifier.GetLocation(),
FlowAnalysis\NullableWalker_Patterns.cs (1)
909((SwitchExpressionSyntax)node.Syntax).SwitchKeyword.GetLocation(),
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
456TryGetWellKnownTypeMember<MethodSymbol>(syntax: null, WellKnownMember.System_IAsyncDisposable__DisposeAsync, out disposeMethod, location: awaitKeyword.GetLocation());
Symbols\AliasSymbol.cs (5)
75return new AliasSymbolFromResolvedTarget(targetSymbol, aliasToken.ValueText, containingSymbol, ImmutableArray.Create(aliasToken.GetLocation()), isExtern); 286: base(syntax.Alias!.Name.Identifier.ValueText, containingSymbol, ImmutableArray.Create(syntax.Alias!.Name.Identifier.GetLocation()), isExtern: false) 294: base(syntax.Identifier.ValueText, containingSymbol, ImmutableArray.Create(syntax.Identifier.GetLocation()), isExtern: true) 388this.CheckUnsafeModifier(DeclarationModifiers.Unsafe, usingDirective.UnsafeKeyword.GetLocation(), diagnostics); 412diagnostics.Add(ErrorCode.ERR_BadNullableReferenceTypeInUsingAlias, nullableType.QuestionToken.GetLocation());
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
23: base(extensionType, WellKnownMemberNames.ExtensionMarkerMethodName, parameterList.OpenParenToken.GetLocation(), parameterList,
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (5)
61diagnostics.Add(ErrorCode.ERR_DupReturnTypeMod, modifier.GetLocation(), modifier.Text); 66diagnostics.Add(ErrorCode.ERR_InvalidFuncPointerReturnTypeModifier, modifier.GetLocation(), modifier.Text); 145checkUnmanagedSupport(compilation, callingConventionSyntax.ManagedOrUnmanagedKeyword.GetLocation(), diagnostics); 166diagnostics.Add(ErrorCode.ERR_InvalidFunctionPointerCallingConvention, unmanagedList.OpenBracketToken.GetLocation(), ""); 172checkUnmanagedSupport(compilation, callingConventionSyntax.ManagedOrUnmanagedKeyword.GetLocation(), diagnostics);
Symbols\Source\LambdaSymbol.cs (2)
238AnonymousMethodExpressionSyntax syntax => syntax.DelegateKeyword.GetLocation(), 239LambdaExpressionSyntax syntax => syntax.ArrowToken.GetLocation(),
Symbols\Source\LocalFunctionSymbol.cs (6)
144addTo.Add(ErrorCode.WRN_MainIgnored, Syntax.Identifier.GetLocation(), this); 215diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 342public override ImmutableArray<Location> Locations => ImmutableArray.Create(Syntax.Identifier.GetLocation()); 344public override Location TryGetFirstLocation() => Syntax.Identifier.GetLocation(); 422diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, parameter.VarianceKeyword.GetLocation()); 428var location = identifier.GetLocation();
Symbols\Source\ModifierUtils.cs (4)
126diagnostics.Add(diagnosticInfo, modifier.GetLocation()); 138diagnostics.Add(ErrorCode.ERR_PartialMisplaced, partialToken.GetLocation()); 441modifier.GetLocation()); 479modifierToken.GetLocation(),
Symbols\Source\ParameterHelpers.cs (21)
273diagnostics.Add(ErrorCode.ERR_ThisInBadContext, thisKeyword.GetLocation()); 289diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 315diagnostics.Add(ErrorCode.ERR_IllegalRefParam, refnessKeyword.GetLocation()); 618diagnostics.Add(ErrorCode.ERR_ThisInBadContext, modifier.GetLocation()); 630diagnostics.Add(ErrorCode.ERR_BadParamModThis, modifier.GetLocation()); 700diagnostics.Add(ErrorCode.ERR_IllegalParams, modifier.GetLocation()); 708diagnostics.Add(ErrorCode.ERR_BadParamModThis, modifier.GetLocation()); 796diagnostics.Add(ErrorCode.ERR_BadFuncPointerParamModifier, modifier.GetLocation(), SyntaxFacts.GetText(modifier.Kind())); 808diagnostics.Add(ErrorCode.ERR_DupParamMod, modifier.GetLocation(), SyntaxFacts.GetText(modifier.Kind())); 813diagnostics.Add(ErrorCode.ERR_BadParameterModifiers, modifier.GetLocation(), SyntaxFacts.GetText(modifier.Kind()), SyntaxFacts.GetText(otherModifierKind)); 818diagnostics.Add(ErrorCode.ERR_ParamsCantBeWithModifier, modifier.GetLocation(), SyntaxFacts.GetText(otherModifierKind)); 847diagnostics.Add(ErrorCode.ERR_BadThisParam, thisKeyword.GetLocation(), owner?.Name ?? ""); 852diagnostics.Add(ErrorCode.ERR_IllegalParams, paramsKeyword.GetLocation()); 875Location loc = ((ParameterSyntax)syntax).Identifier.GetNextToken(includeZeroWidth: true).GetLocation(); //could be missing 944diagnostics.Add(ErrorCode.ERR_RefOutDefaultValue, refnessKeyword.GetLocation()); 950diagnostics.Add(ErrorCode.ERR_DefaultValueForParamsParameter, paramsKeyword.GetLocation()); 960diagnostics.Add(ErrorCode.ERR_DefaultValueForExtensionParameter, thisKeyword.GetLocation()); 982diagnostics.Add(ErrorCode.ERR_NoConversionForDefaultParam, parameterSyntax.Identifier.GetLocation(), 994diagnostics.Add(ErrorCode.ERR_NotNullRefDefaultParameter, parameterSyntax.Identifier.GetLocation(), 1016diagnostics.Add(ErrorCode.ERR_NoConversionForNubDefaultParam, parameterSyntax.Identifier.GetLocation(), 1046parameterSyntax.Identifier.GetLocation(),
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1700diagnostics.Add(ErrorCode.ERR_ParamsMustBeCollection, ParameterSyntax.Modifiers.First(static m => m.IsKind(SyntaxKind.ParamsKeyword)).GetLocation());
Symbols\Source\SourceConstructorSymbol.cs (1)
27return new SourceConstructorSymbol(containingType, syntax.Identifier.GetLocation(), syntax, methodKind, isNullableAnalysisEnabled, diagnostics);
Symbols\Source\SourceCustomEventAccessorSymbol.cs (2)
32syntax.Keyword.GetLocation(), explicitlyImplementedEventOpt, aliasQualifierOpt, 55diagnostics.Add(ErrorCode.ERR_NoModifiersOnAccessor, syntax.Modifiers[0].GetLocation());
Symbols\Source\SourceCustomEventSymbol.cs (5)
95diagnostics.Add(ErrorCode.ERR_DuplicateAccessor, accessor.Keyword.GetLocation()); 106diagnostics.Add(ErrorCode.ERR_DuplicateAccessor, accessor.Keyword.GetLocation()); 112diagnostics.Add(ErrorCode.ERR_AddOrRemoveExpected, accessor.Keyword.GetLocation()); 126diagnostics.Add(ErrorCode.ERR_AddRemoveMustHaveBody, accessor.SemicolonToken.GetLocation()); 134diagnostics.Add(ErrorCode.ERR_AbstractEventHasAccessors, syntax.AccessorList.OpenBraceToken.GetLocation(), this);
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
30: base(delegateType, syntax.GetReference(), location: syntax.Identifier.GetLocation(), isIterator: false,
Symbols\Source\SourceDestructorSymbol.cs (2)
34diagnostics.Add(ErrorCode.ERR_BadDestructorName, syntax.Identifier.GetLocation()); 78location = syntax.Identifier.GetLocation();
Symbols\Source\SourceEventSymbol.cs (1)
52_location = nameTokenSyntax.GetLocation();
Symbols\Source\SourceLocalSymbol.cs (1)
407=> _identifierToken.GetLocation();
Symbols\Source\SourceMemberContainerSymbol.cs (2)
1928ReportReservedTypeName(identifier?.Text, this.DeclaringCompilation, diagnostics.DiagnosticBag, identifier?.GetLocation() ?? Location.None); 3942diagnostics.Add(ErrorCode.ERR_ConstructorInStaticClass, syntax.Identifier.GetLocation());
Symbols\Source\SourceMemberFieldSymbol.cs (1)
89diagnostics.Add(ErrorCode.ERR_BadConstType, constToken.GetLocation(), type);
Symbols\Source\SourceMethodSymbol.cs (1)
39diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refKeyword.GetLocation(), refKeyword.ToString());
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1303var linePositionZeroBased = referencedToken.GetLocation().GetLineSpan().StartLinePosition;
Symbols\Source\SourceNamedTypeSymbol.cs (1)
193diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, tp.VarianceKeyword.GetLocation());
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (2)
499diagnostics.Add(ErrorCode.ERR_GlobalExternAlias, aliasSyntax.Identifier.GetLocation()); 738var unsafeKeywordLocation = usingDirective.UnsafeKeyword.GetLocation();
Symbols\Source\SourceOrdinaryMethodSymbol.cs (4)
238var loc = identifier.GetLocation(); 248CheckExtensionAttributeAvailability(DeclaringCompilation, syntax.ParameterList.Parameters[0].Modifiers.FirstOrDefault(SyntaxKind.ThisKeyword).GetLocation(), diagnostics); 1164diagnostics.Add(ErrorCode.ERR_IllegalVarianceSyntax, parameter.VarianceKeyword.GetLocation()); 1168var location = identifier.GetLocation();
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
53syntax.Keyword.GetLocation(),
Symbols\Source\SourcePropertySymbol.cs (8)
23var location = nameToken.GetLocation(); 29var location = syntax.ThisKeyword.GetLocation(); 264diagnostics.Add(ErrorCode.ERR_DuplicateAccessor, accessor.Keyword.GetLocation()); 277diagnostics.Add(ErrorCode.ERR_DuplicateAccessor, accessor.Keyword.GetLocation()); 282diagnostics.Add(ErrorCode.ERR_GetOrSetExpected, accessor.Keyword.GetLocation()); 629diagnostics.Add(ErrorCode.ERR_IndexerNeedsParam, parameterSyntaxOpt.GetLastToken().GetLocation()); 642diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 653diagnostics.Add(ErrorCode.WRN_DefaultValueForUnconsumedLocation, paramNameToken.GetLocation(), paramNameToken.ValueText);
Symbols\Source\SourceUserDefinedConversionSymbol.cs (1)
35diagnostics.Add(ErrorCode.ERR_ImplicitConversionOperatorCantBeChecked, syntax.CheckedKeyword.GetLocation());
Symbols\Source\SourceUserDefinedOperatorSymbol.cs (2)
25var location = syntax.OperatorToken.GetLocation(); 36diagnostics.Add(ErrorCode.ERR_OperatorCantBeChecked, syntax.CheckedKeyword.GetLocation(), SyntaxFacts.GetText(SyntaxFacts.GetOperatorKind(name)));
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
60Binder.CheckFeatureAvailability(syntax, MessageID.IDS_FeatureUserDefinedCompoundAssignmentOperators, diagnostics, ((OperatorDeclarationSyntax)syntax).OperatorToken.GetLocation());
Symbols\Symbol.cs (1)
1501constraintClauses[0].WhereKeyword.GetLocation());
Symbols\Symbol_Attributes.cs (3)
711targetOpt.Identifier.GetLocation(), targetOpt.Identifier.ValueText, allowedTargets.ToDisplayString()); 729diagnostics.Add(ErrorCode.ERR_GlobalAttributesNotAllowed, targetOpt.Identifier.GetLocation()); 740targetOpt.Identifier.GetLocation(), targetOpt.Identifier.ToString(), allowedTargets.ToDisplayString());
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (3)
24base(containingType, syntax.Identifier.GetLocation(), syntax, isIterator: false, MakeModifiersAndFlags(containingType, syntax)) 178MessageID.IDS_FeaturePrimaryConstructors.CheckFeatureAvailability(diagnostics, attributeDeclarationSyntax, attributeDeclarationSyntax.Target.Identifier.GetLocation()); 186target.GetLocation(), target.ToString(), (AttributeOwner.AllowedAttributeLocations & ~AttributeLocation.Method).ToDisplayString());
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
89((ParameterSyntax)syntax).Identifier.GetLocation(),
Syntax\SyntaxFactory.cs (1)
1648/// the <see cref="SyntaxToken.GetLocation"/> API may yield surprising results for
Syntax\SyntaxTokenParser.cs (1)
46/// the <see cref="SyntaxToken.GetLocation"/> API may yield surprising results for
Microsoft.CodeAnalysis.CSharp.CodeStyle (44)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
111firstToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
62return root.Members.OfType<GlobalStatementSyntax>().First().GetFirstToken().GetLocation();
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
34return isHidden ? methodDeclaration.GetLocation() : methodDeclaration.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
70location: switchStatement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
54localFunction.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
211return (nameToken.Value.GetLocation(), declaration.GetLocation());
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
121primaryLocation = typeDeclaration.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
80arrowExpressionClause.ArrowToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
61conditionalExpression.QuestionToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
84secondBrace.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveStatementPlacement\CSharpConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
44=> block.GetLastToken().GetLocation();
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
92colonToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
76statement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\PopulateSwitch\CSharpPopulateSwitchExpressionDiagnosticAnalyzer.cs (1)
16=> switchBlock.SwitchKeyword.GetLocation();
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
43((PostfixUnaryExpressionSyntax)left).OperatorToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\RemoveUnusedParametersAndValues\CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
86return variableDeclarator.Identifier.GetLocation(); 106return forEachStatement.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (1)
219castOrSelectName.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (2)
196initializer.OpenBraceToken.GetLocation(), 211expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
205return new(memberAccessExpression.Name.Identifier.GetLocation(), localDeclarationStatement, creationExpression, matches.ToImmutable(), changesSemantics);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (2)
53memberAccess.Name.Identifier.GetLocation(), 63invocationExpression.ArgumentList.CloseParenToken.GetLocation());
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
56memberAccess.Name.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
101memberAccess.Name.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (2)
95objectCreationExpression.NewKeyword.GetLocation(), 105objectCreationExpression.ArgumentList.CloseParenToken.GetLocation());
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (2)
63expression.GetFirstToken().GetLocation(), 103expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
92coalesceExpression.OperatorToken.GetLocation(), 165ifStatement.IfKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
67variableDeclaration.Variables[0].Identifier.GetLocation(), 82forEachStatement.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (1)
51explicitLambda.ParameterList.OpenParenToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
59objectCreation.NewKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
145localDeclaration.Declaration.Variables[0].Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
97isKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
189_primaryConstructorDeclaration.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
125outermostUsing.UsingKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
235declarator.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
122localDeclarationStatement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfDiagnosticAnalyzer.cs (1)
76invocation.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
132var location = syntaxNode.GetFirstToken().GetLocation();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
61var location = token.GetLocation();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
236=> context.ReportDiagnostic(Diagnostic.Create(s_syntaxDiagnosticDescriptor, context.Tree.GetRoot().GetFirstToken().GetLocation()));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
3721Assert.Equal(field1.GetLocation(), diagnostic.Location);
Diagnostics\GetDiagnosticsTests.cs (7)
1143PropertyDeclarationSyntax propertyDecl => propertyDecl.Identifier.GetLocation(), 1144IndexerDeclarationSyntax indexerDecl => indexerDecl.ThisKeyword.GetLocation(), 1145EventDeclarationSyntax eventDecl => eventDecl.Identifier.GetLocation(), 1153MethodDeclarationSyntax methodDecl => methodDecl.Identifier.GetLocation(), 1154OperatorDeclarationSyntax operatorDecl => operatorDecl.OperatorToken.GetLocation(), 1155ConstructorDeclarationSyntax constructorDecl => constructorDecl.Identifier.GetLocation(), 1156DestructorDeclarationSyntax destructorDecl => destructorDecl.Identifier.GetLocation(),
Microsoft.CodeAnalysis.CSharp.Features (45)
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (1)
137return Tuple.Create(type, token.GetLocation());
GenerateType\CSharpGenerateTypeService.cs (1)
556return (namespaceSymbol, namedTypeSymbol, enclosingNamespace.GetLastToken().GetLocation());
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
111firstToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
62return root.Members.OfType<GlobalStatementSyntax>().First().GetFirstToken().GetLocation();
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
34return isHidden ? methodDeclaration.GetLocation() : methodDeclaration.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
70location: switchStatement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
54localFunction.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
211return (nameToken.Value.GetLocation(), declaration.GetLocation());
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
121primaryLocation = typeDeclaration.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
80arrowExpressionClause.ArrowToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
61conditionalExpression.QuestionToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
84secondBrace.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveStatementPlacement\CSharpConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
44=> block.GetLastToken().GetLocation();
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
92colonToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
76statement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\PopulateSwitch\CSharpPopulateSwitchExpressionDiagnosticAnalyzer.cs (1)
16=> switchBlock.SwitchKeyword.GetLocation();
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
43((PostfixUnaryExpressionSyntax)left).OperatorToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\RemoveUnusedParametersAndValues\CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
86return variableDeclarator.Identifier.GetLocation(); 106return forEachStatement.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (1)
219castOrSelectName.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (2)
196initializer.OpenBraceToken.GetLocation(), 211expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
205return new(memberAccessExpression.Name.Identifier.GetLocation(), localDeclarationStatement, creationExpression, matches.ToImmutable(), changesSemantics);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (2)
53memberAccess.Name.Identifier.GetLocation(), 63invocationExpression.ArgumentList.CloseParenToken.GetLocation());
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
56memberAccess.Name.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
101memberAccess.Name.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (2)
95objectCreationExpression.NewKeyword.GetLocation(), 105objectCreationExpression.ArgumentList.CloseParenToken.GetLocation());
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (2)
63expression.GetFirstToken().GetLocation(), 103expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
92coalesceExpression.OperatorToken.GetLocation(), 165ifStatement.IfKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
67variableDeclaration.Variables[0].Identifier.GetLocation(), 82forEachStatement.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (1)
51explicitLambda.ParameterList.OpenParenToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
59objectCreation.NewKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
145localDeclaration.Declaration.Variables[0].Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
97isKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
189_primaryConstructorDeclaration.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
125outermostUsing.UsingKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
235declarator.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
122localDeclarationStatement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfDiagnosticAnalyzer.cs (1)
76invocation.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
132var location = syntaxNode.GetFirstToken().GetLocation();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (13)
Diagnostics\Suppression\RemoveSuppressionTests.cs (1)
49var location = _reportDiagnosticsWithoutLocation ? Location.None : classDecl.Identifier.GetLocation();
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (1)
51var location = classDecl.Identifier.GetLocation();
Diagnostics\Suppression\SuppressionTests.cs (11)
750context.ReportDiagnostic(Diagnostic.Create(Decsciptor, classDecl.Identifier.GetLocation())); 864context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 929context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 1122context.ReportDiagnostic(Diagnostic.Create(Descriptor, classDecl.Identifier.GetLocation())); 1132context.ReportDiagnostic(Diagnostic.Create(Descriptor, method.Identifier.GetLocation())); 1137context.ReportDiagnostic(Diagnostic.Create(Descriptor, property.Identifier.GetLocation())); 1142context.ReportDiagnostic(Diagnostic.Create(Descriptor, field.Declaration.Variables.First().Identifier.GetLocation())); 1147context.ReportDiagnostic(Diagnostic.Create(Descriptor, e.Identifier.GetLocation())); 2192context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 2202context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.Identifier.GetLocation())); 2207context.ReportDiagnostic(Diagnostic.Create(_descriptor, extensionBlock.Keyword.GetLocation()));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
350Assert.Equal(localType.Locations[0], anonObjectCreation.NewKeyword.GetLocation());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
Syntax\SyntaxFactoryTests.cs (5)
425Assert.Equal(Location.None, literal.GetLocation()); 439Assert.Equal(Location.None, literal.GetLocation()); 453Assert.Equal(expectedLocation, expression.Token.GetLocation()); 467Assert.Equal(expectedLocation, expression.Token.GetLocation()); 477Assert.Equal(Location.None, token.GetLocation());
Syntax\SyntaxNodeTests.cs (1)
2082var tokenLocation = method.Identifier.GetLocation();
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
Rename\CSharpRenameRewriterLanguageService.cs (7)
419if (_renameRenamableSymbolDeclaration != null && _renamableDeclarationLocation == token.GetLocation()) 816conflicts.AddRange(visitor.ConflictingTokens.Select(t => reverseMappedLocations[t.GetLocation()])); 830conflicts.AddRange(visitor.ConflictingTokens.Select(t => reverseMappedLocations[t.GetLocation()])); 840conflicts.AddRange(visitor.ConflictingTokens.Select(t => reverseMappedLocations[t.GetLocation()])); 902conflicts.Add(reverseMappedLocations[typeParameter.Identifier.GetLocation()]); 917conflicts.Add(reverseMappedLocations[typeParameterToken.GetLocation()]); 980return [token.GetLocation()];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
61var location = token.GetLocation();
Microsoft.CodeAnalysis.EditorFeatures (1)
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (1)
253return sourceSymbol.Locations.Any(static (loc, token) => loc == token.GetLocation(), token)
Microsoft.CodeAnalysis.Features (29)
BraceCompletion\AbstractBraceCompletionService.cs (2)
95return new BraceCompletionContext(document, fallbackOptions, leftToken.GetLocation().SourceSpan.Start, rightToken.GetLocation().SourceSpan.End, caretLocation);
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionAnalyzer.cs (1)
96token.GetLocation(),
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
70name.GetLocation(),
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
179operatorToken.GetLocation(),
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
146node.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
111additionalLocations: [nextToken.GetLocation()],
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
81additionalLocations: [token.GetLocation()],
src\Analyzers\Core\Analyzers\OrderModifiers\AbstractOrderModifiersDiagnosticAnalyzer.cs (1)
93DiagnosticHelper.Create(Descriptor, modifiers.First().GetLocation(), notificationOption, context.Options, additionalLocations: null, properties: null));
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (1)
38=> switchBlock.GetFirstToken().GetLocation();
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
113operatorToken.GetLocation(), 114additionalLocations: [operatorToken.GetLocation()],
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (2)
110parenthesizedExpression.GetFirstToken().GetLocation(), 111parenthesizedExpression.GetLastToken().GetLocation());
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
114ifStatement.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
188objectCreationExpression.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
160assignmentToken.GetLocation(), 180assignmentToken.GetLocation(), 193assignmentToken.GetLocation(),
src\Analyzers\Core\Analyzers\UseConditionalExpression\AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
54ifStatement.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
49ifStatement.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
130objectCreationExpression.GetFirstToken().GetLocation(),
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (2)
446new CodeGenerationContext(Token.GetLocation())); 492new CodeGenerationContext(Token.GetLocation())),
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
37contextLocation: _state.IdentifierToken.GetLocation())),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
74afterThisLocation: _state.IdentifierToken.GetLocation(),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
51return IdentifierToken.GetLocation();
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
57contextLocation: _state.IdentifierToken.GetLocation()));
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
63var context = new CodeGenerationContext(beforeThisLocation: _state.IdentifierToken.GetLocation());
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Diagnostics\NonLocalDiagnosticTests.cs (2)
92var diagnostic = Diagnostic.Create(NonLocalDescriptor, root.GetFirstToken().GetLocation()); 103var diagnostic = Diagnostic.Create(CompilationEndDescriptor, root.GetFirstToken().GetLocation());
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Microsoft.CodeAnalysis.Test.Utilities (2)
Diagnostics\CommonDiagnosticAnalyzers.cs (2)
1665ReportDiagnosticsCore(addDiagnostic, tree.GetRoot().GetLastToken().GetLocation(), tree.FilePath); 2606context.ReportDiagnostic(Diagnostic.Create(Descriptor, variable.Identifier.GetLocation()));
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (1)
1400var location = token.GetLocation();
Microsoft.CodeAnalysis.VisualBasic (24)
Binding\Binder_AnonymousTypes.vb (1)
281typeLocationToken.GetLocation(),
Binding\Binder_Delegates.vb (2)
926Dim location = token.GetLocation() 933Dim location = token.GetLocation()
Binding\Binder_Query.vb (1)
3241syntax.QueryClauseKeywordOrRangeVariableIdentifier.GetLocation(),
Binding\Binder_Symbols.vb (1)
645locations.Add(nameSyntax.GetLocation)
Binding\Binder_Utils.vb (5)
227privateProtectedToken.GetLocation(), 927diagnostics.Add(ERRID.ERR_ByRefIllegal1, token.GetLocation(), container.GetKindText()) 932diagnostics.Add(ERRID.ERR_ParamArrayIllegal1, token.GetLocation(), container.GetKindText()) 937diagnostics.Add(ERRID.ERR_OptionalIllegal1, token.GetLocation(), container.GetKindText()) 990Dim location = token.GetLocation()
Binding\BindingDiagnosticBag.vb (1)
95Return ReportUseSite(symbol, token.GetLocation())
BoundTree\BoundTreeVisitor.vb (1)
168Return syntax.GetFirstToken().GetLocation()
BoundTree\GroupTypeInferenceLambda.vb (2)
25Syntax.QueryClauseKeywordOrRangeVariableIdentifier.GetLocation(), 27Syntax.QueryClauseKeywordOrRangeVariableIdentifier.GetLocation(),
Symbols\Source\CustomEventAccessorSymbol.vb (3)
257Dim location = token.GetLocation() 263Dim location = token.GetLocation() 274Dim location = token.GetLocation()
Symbols\Source\LocalSymbol.vb (1)
594Return _identifierToken.GetLocation()
Symbols\Source\RangeVariableSymbol.vb (1)
185Return ImmutableArray.Create(Of Location)(_identifierToken.GetLocation())
Symbols\Source\SourceLabelSymbol.vb (1)
56Return ImmutableArray.Create(Of Location)(_labelName.GetLocation())
Symbols\Source\SourceNamedTypeSymbol.vb (1)
1451GetTypeIdentifierToken(syntax).GetLocation())
Symbols\Source\SourcePropertyAccessorSymbol.vb (1)
467Dim location = token.GetLocation()
Symbols\Source\SourcePropertySymbol.vb (1)
248Dim location = identifier.GetLocation()
Syntax\SyntaxNodeFactories.vb (1)
142''' the <see cref="SyntaxToken.GetLocation"/> API may yield surprising results for
Microsoft.CodeAnalysis.Workspaces (9)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (5)
211token.GetLocation(), 413var location = node.GetFirstToken().GetLocation(); 455var location = expression.GetFirstToken().GetLocation(); 530var location = node.GetFirstToken().GetLocation(); 565var location = node.GetFirstToken().GetLocation();
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
233var containingStringLocation = token.GetLocation();
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (2)
277newKeywordToken.GetLocation(), 318token.GetLocation(),
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (1)
168var location = node.GetFirstToken().GetLocation();
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
BatchFixAllProviderTests.cs (1)
64context.ReportDiagnostic(Diagnostic.Create(Descriptor, node.Token.GetLocation()));
Microsoft.Extensions.Logging.Generators (3)
LoggerMessageGenerator.Parser.cs (3)
256Diag(DiagnosticDescriptors.MalformedFormatStrings, method.Identifier.GetLocation(), method.Identifier.ToString()); 264Diag(DiagnosticDescriptors.InvalidLoggingMethodName, method.Identifier.GetLocation()); 278Diag(DiagnosticDescriptors.LoggingMethodIsGeneric, method.Identifier.GetLocation());
Microsoft.Gen.ContextualOptions (4)
Parser.cs (4)
32.Select(modifier => Diagnostic.Create(DiagDescriptors.ContextCannotBeStatic, modifier.GetLocation(), type.Name))); 46.Select(modifier => Diagnostic.Create(DiagDescriptors.ContextCannotBeRefLike, modifier.GetLocation(), type.Name))); 57type.Definitions.Select(def => Diagnostic.Create(DiagDescriptors.ContextMustBePartial, def.Identifier.GetLocation(), type.Name))); 68type.Definitions.Select(def => Diagnostic.Create(DiagDescriptors.ContextDoesNotHaveValidProperties, def.Identifier.GetLocation(), type.Name)));
Microsoft.Gen.Logging (5)
Parsing\Parser.cs (5)
218Diag(DiagDescriptors.LoggingMethodShouldBeStatic, method.Identifier.GetLocation()); 234Diag(DiagDescriptors.MissingLoggerMember, method.Identifier.GetLocation(), typeDec.Identifier.Text); 258Diag(DiagDescriptors.EmptyLoggingMethod, method.Identifier.GetLocation(), methodSymbol.Name); 390Diag(DiagDescriptors.MalformedFormatStrings, method.Identifier.GetLocation(), method.Identifier.ToString()); 416Diag(DiagDescriptors.LoggingMethodMustBePartial, method.Identifier.GetLocation());
Microsoft.Interop.ComInterfaceGenerator (25)
ComClassInfo.cs (3)
30return DiagnosticOr<ComClassInfo>.From(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, syntax.Identifier.GetLocation())); 38syntax.Identifier.GetLocation(), 59syntax.Identifier.GetLocation(),
ComInterfaceInfo.cs (16)
59return DiagnosticOrInterfaceInfo.From(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, syntax.Identifier.GetLocation())); 67syntax.Identifier.GetLocation(), 78syntax.Identifier.GetLocation(), 111syntax.Identifier.GetLocation()), 130syntax.Identifier.GetLocation(), 194syntax.Identifier.GetLocation(), 219syntax.Identifier.GetLocation(), 228syntax.Identifier.GetLocation(), 238syntax.Identifier.GetLocation(), 253syntax.Identifier.GetLocation(), 275syntax.Identifier.GetLocation(), 289syntax.Identifier.GetLocation(), 310syntax.Identifier.GetLocation(), 320syntax.Identifier.GetLocation()); 350syntax.Identifier.GetLocation(), 392syntax.Identifier.GetLocation(),
ComMethodInfo.cs (2)
74return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, comMethodDeclaringSyntax.Identifier.GetLocation(), method.Name); 80return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, comMethodDeclaringSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
VtableIndexStubGenerator.cs (4)
400return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 408return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 415return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); 421return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute, methodSyntax.Identifier.GetLocation(), method.Name);
Microsoft.Interop.JavaScript.JSImportGenerator (6)
JSExportGenerator.cs (3)
462return Diagnostic.Create(GeneratorDiagnostics.InvalidExportAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 470return Diagnostic.Create(GeneratorDiagnostics.InvalidExportAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 477return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
JSImportGenerator.cs (3)
371return Diagnostic.Create(GeneratorDiagnostics.InvalidImportAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 379return Diagnostic.Create(GeneratorDiagnostics.InvalidImportAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 386return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.LibraryImportGenerator (3)
LibraryImportGenerator.cs (3)
550return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 556return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, nonPartialIdentifier); 562return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.LibraryImportGenerator.Downlevel (3)
DownlevelLibraryImportGenerator.cs (3)
420return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 426return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, nonPartialIdentifier); 432return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.SourceGeneration (2)
MethodSignatureDiagnosticLocations.cs (2)
57: this(syntax.Identifier.Text, syntax.ParameterList.Parameters.Select(p => p.Identifier.GetLocation()).ToImmutableArray(), syntax.Identifier.GetLocation())
Microsoft.ML.InternalCodeAnalyzer (3)
NameAnalyzer.cs (3)
38return Diagnostic.Create(rule, identifier.GetLocation(), props, text); 42return Diagnostic.Create(rule, identifier.GetLocation(), props, newArgs); 172var diagnostic = Diagnostic.Create(PrivateFieldName.Rule, identifier.GetLocation(), name);
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
61var location = token.GetLocation();
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\ImplementITypedDataObject\ImplementITypedDataObjectAnalyzer.cs (1)
70identifier.GetLocation(),
Test.Utilities (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);
Text.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
75return token.GetLocation().CreateDiagnostic(rule, args);