270 references to None
Aspire.Hosting.Integration.Analyzers (3)
AspireExportAnalyzer.cs (3)
160var location = attributeSyntax?.GetLocation() ?? method.Locations.FirstOrDefault() ?? Location.None; 254var location = method.Locations.FirstOrDefault() ?? Location.None; 713var attrLocation = attrSyntax?.GetLocation() ?? Location.None;
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
39RecordDiagnostic(DiagnosticDescriptors.LanguageVersionNotSupported, trimmedLocation: Location.None);
GenerateDocumentationAndConfigFiles (6)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
121location = Location.None; 187var diagnostic = Diagnostic.Create(rule, Location.None, properties, args);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
657return Location.None; 689return Location.None; 715return Location.None;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
30locations.Add(element.Locations.FirstOrDefault() ?? Location.None);
ILLink.RoslynAnalyzer (4)
DynamicallyAccessedMembersAnalyzer.cs (2)
99return Location.None; 101return locations.Value.Length > 0 ? locations.Value[0] : Location.None;
RequiresAnalyzerBase.cs (1)
440var diag = Diagnostic.Create(diagnosticDescriptor, Location.None, refAssembly.Name);
TrimAnalysis\TrimAnalysisVisitor.cs (1)
357HandleCall(_trimAnalyzer, FeatureContext.None, _typeNameResolver, operation, OwningSymbol, calledMethod, instance, arguments, Location.None, null, _multiValueLattice, out MultiValue methodReturnValue);
Microsoft.AspNetCore.App.Analyzers (1)
RouteHandlers\DisallowMvcBindArgumentsOnParameters.cs (1)
29var location = Location.None;
Microsoft.AspNetCore.Components.Analyzers (2)
InternalUsageAnalyzer.cs (2)
168symbolForDiagnostic.DeclaringSyntaxReferences.FirstOrDefault()?.GetSyntax().GetLocation() ?? Location.None, 178symbolForDiagnostic.DeclaringSyntaxReferences.FirstOrDefault()?.GetSyntax().GetLocation() ?? Location.None,
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
InternalUsageAnalyzer.cs (2)
168symbolForDiagnostic.DeclaringSyntaxReferences.FirstOrDefault()?.GetSyntax().GetLocation() ?? Location.None, 178symbolForDiagnostic.DeclaringSyntaxReferences.FirstOrDefault()?.GetSyntax().GetLocation() ?? Location.None,
Microsoft.AspNetCore.Mvc.Analyzers (2)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (1)
140return syntax?.GetLocation() ?? Location.None;
TopLevelParameterNameAnalyzer.cs (1)
71Location.None;
Microsoft.CodeAnalysis (74)
CodeGen\ILBuilderEmit.cs (1)
758_diagnostics.Add(messageProvider.CreateDiagnostic(code, syntax?.Location ?? Location.None));
CodeGen\LocalDefinition.cs (1)
101return Location.None;
CodeGen\PrivateImplementationDetails.cs (1)
350syntaxNode?.GetLocation() ?? Location.None,
CodeGen\SignatureOnlyLocalDefinition.cs (1)
70public Location Location => Location.None;
CommandLine\AnalyzerConfigSet.cs (3)
434Location.None, 505Location.None, 530Location.None,
CommandLine\CommandLineArguments.cs (1)
448var diagnostic = PortableExecutableReference.ExceptionToDiagnostic(e, messageProviderOpt!, Location.None, cmdReference.Reference, cmdReference.Properties.Kind);
CommandLine\CommonCompiler.CompilerEmitStreamProvider.cs (1)
129diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_CantOpenFileWrite, Location.None, _filePath, message));
CommandLine\CommonCompiler.cs (4)
1309diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.FTL_InvalidInputFileName, Location.None, finalPdbFilePath)); 1688diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_ErrorBuildingWin32Resource, Location.None, ex.Message)); 1722diagnostics.Add(messageProvider.CreateDiagnostic(errorCode, Location.None, fullPath, ex.Message)); 1733diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.FTL_InvalidInputFileName, Location.None, path ?? ""));
Compilation\Compilation.cs (16)
2042diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 2047diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 2052diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 2073diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 2166diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_ResourceNotUnique, Location.None, resource.ResourceName)); 2173diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_ResourceFileNameNotUnique, Location.None, fileName)); 2181diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_ResourceFileNameNotUnique, Location.None, fileName)); 2192diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_ResourceNotUnique, Location.None, name)); 3211diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_ResourceInModule, Location.None)); 3346diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PdbWritingFailed, Location.None, ex.Message)); 3351diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PeWritingFailure, Location.None, e.InnerException?.ToString() ?? "")); 3356diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_CantReadResource, Location.None, e.Message, e.InnerException?.Message ?? "")); 3361diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PermissionSetAttributeFileReadError, Location.None, e.FileName, e.PropertyName, e.Message)); 3583diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PdbWritingFailed, Location.None, e.Message)); 3588diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PeWritingFailure, Location.None, e.InnerException?.ToString() ?? "")); 3593diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PermissionSetAttributeFileReadError, Location.None, e.FileName, e.PropertyName, e.Message));
Compilation\CompilationOptions.cs (5)
571Location.None, nameof(CryptoPublicKey), nameof(CryptoKeyFile))); 577Location.None, nameof(CryptoPublicKey), nameof(CryptoKeyContainer))); 586Location.None, nameof(CryptoKeyFile))); 592Location.None, nameof(PublicSign), nameof(CryptoKeyContainer))); 598Location.None, nameof(PublicSign), nameof(DelaySign)));
Compilation\ParseOptions.cs (2)
84builder.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_BadSourceCodeKind, Location.None, SpecifiedKind.ToString())); 89builder.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_BadDocumentationMode, Location.None, DocumentationMode.ToString()));
Diagnostic\CommonMessageProvider.cs (1)
261diagnostics.Add(CreateDiagnostic(ERR_OutputWriteFailed, Location.None, filePath, e.Message));
Diagnostic\Diagnostic.cs (11)
44/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 59/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 80/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 101/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 128/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 160location: location ?? Location.None, 179/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 229/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 278severity, defaultSeverity, isEnabledByDefault, warningLevel, location ?? Location.None, additionalLocations, customTags, properties, isSuppressed); 293return new DiagnosticWithInfo(info, Location.None); 391/// Gets the primary location of the diagnostic, or <see cref="Location.None"/> if no primary location.
Diagnostic\Diagnostic_SimpleDiagnostic.cs (1)
50_location = location ?? Location.None;
Diagnostic\DiagnosticDescriptor.cs (1)
244var effectiveDiagnostic = compilationOptions.FilterDiagnostic(Diagnostic.Create(this, Location.None), CancellationToken.None);
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
1408return Diagnostic.Create(descriptor, Location.None, messageArguments); 1455return Diagnostic.Create(descriptor, Location.None, messageArguments);
Emit\EmitOptions.cs (6)
338diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidDebugInformationFormat, Location.None, (int)DebugInformationFormat)); 350diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidInstrumentationKind, Location.None, (int)instrumentationKind)); 361diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidFileAlignment, Location.None, FileAlignment)); 366diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidSubsystemVersion, Location.None, SubsystemVersion.ToString())); 377diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidHashAlgorithmName, Location.None, PdbChecksumAlgorithm.ToString())); 382diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidHashAlgorithmName, Location.None, ""));
MetadataReader\MetadataHelpers.cs (2)
998messageProvider.CreateDiagnostic(code, Location.None, 1009messageProvider.CreateDiagnostic(code, Location.None,
PEWriter\Members.cs (1)
359/// Use <see cref="Location.None"/> rather than null.
PEWriter\MetadataWriter.cs (1)
1456return symbolOpt?.GetFirstLocationOrNone() ?? Location.None;
PEWriter\TypeNameSerializer.cs (1)
86context.Location ?? Location.None));
ReferenceManager\CommonReferenceManager.Binding.cs (1)
294var existingReference = TryAddAssembly(resolvedAssemblyIdentity, resolvedReference, index, resolutionDiagnostics, Location.None, assemblyReferencesBySimpleName, supersedeLowerVersions);
ReferenceManager\CommonReferenceManager.Resolution.cs (3)
278location = Location.None; 548var metadata = GetMetadata(peReference, MessageProvider, Location.None, diagnostics); 560diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_MetadataFileNotAssembly, Location.None, peReference.Display ?? ""));
SourceGeneration\GeneratorDriver.cs (1)
596return Diagnostic.Create(descriptor, Location.None, generator.GetGeneratorType().Name, e.GetType().Name, e.Message, e.CreateDiagnosticDescription());
StrongName\StrongNameKeys.cs (3)
98return new StrongNameKeys(messageProvider.CreateDiagnostic(messageProvider.ERR_BadCompilationOptionValue, Location.None, 219return messageProvider.CreateDiagnostic(messageProvider.ERR_PublicKeyContainerFailure, Location.None, name, message); 224return messageProvider.CreateDiagnostic(messageProvider.ERR_PublicKeyFileFailure, Location.None, path, message);
Symbols\ISymbolInternal.cs (1)
104/// will return <see cref="Location.None"/>.
Syntax\SyntaxToken.cs (1)
648? Location.None
Syntax\SyntaxTrivia.cs (1)
413return this.SyntaxTree?.GetLocation(this.Span) ?? Location.None;
Microsoft.CodeAnalysis.Analyzers (6)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
121location = Location.None; 187var diagnostic = Diagnostic.Create(rule, Location.None, properties, args);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
657return Location.None; 689return Location.None; 715return Location.None;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
30locations.Add(element.Locations.FirstOrDefault() ?? Location.None);
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
121location = Location.None; 187var diagnostic = Diagnostic.Create(rule, Location.None, properties, args);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
657return Location.None; 689return Location.None; 715return Location.None;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
30locations.Add(element.Locations.FirstOrDefault() ?? Location.None);
Microsoft.CodeAnalysis.CodeStyle (9)
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (4)
22/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 69/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 133/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 244/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param>
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
142context.ReportDiagnostic(Diagnostic.Create(s_enableGenerateDocumentationFileIdDescriptor, Location.None));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
657return Location.None; 689return Location.None; 715return Location.None;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
30locations.Add(element.Locations.FirstOrDefault() ?? Location.None);
Microsoft.CodeAnalysis.CSharp (42)
Binder\InMethodBinder.cs (1)
249Debug.Assert(oldLocation != newLocation || oldLocation == Location.None || newLocation.SourceTree?.GetRoot().ContainsDiagnostics == true,
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3679bool result = !_binder.MethodIsCompatibleWithDelegateOrFunctionPointer(node.ReceiverOpt, conv.IsExtensionMethod, conv.Method, delegateType, Location.None, BindingDiagnosticBag.Discarded);
CommandLine\CSharpCommandLineParser.cs (1)
1573new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion())), Location.None));
Compilation\CSharpCompilation.cs (5)
613diagnostics.Add(ErrorCode.ERR_DebugEntryPointNotSourceMethodDefinition, Location.None); 3099new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion())), Location.None)); 3106new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureUnsafeEvolution.RequiredVersion())), Location.None)); 4426var location = memberLocations.IsDefault ? Location.None : memberLocations[i]; 4431var descriptor = new AnonymousTypeDescriptor(fields.ToImmutableAndFree(), Location.None);
Compiler\DocumentationCommentCompiler.cs (1)
111diagnostics.Add(ErrorCode.ERR_DocFileGen, Location.None, e.Message);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (1)
268diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_EncNoPIAReference, embeddedType.AdaptedSymbol), Location.None);
Emitter\Model\PEAssemblyBuilder.cs (9)
426Compilation.CheckIfAttributeShouldBeEmbedded(EmbeddableAttributes.NullablePublicOnlyAttribute, diagnostics, Location.None)) 434Compilation.CheckIfAttributeShouldBeEmbedded(EmbeddableAttributes.RefSafetyRulesAttribute, diagnostics, Location.None)) 440Compilation.CheckIfAttributeShouldBeEmbedded(EmbeddableAttributes.MemorySafetyRulesAttribute, diagnostics, Location.None)) 446Compilation.CheckIfAttributeShouldBeEmbedded(EmbeddableAttributes.RequiresUnsafeAttribute, diagnostics, Location.None)) 737Binder.ReportUseSite(result, diagnostics, Location.None); 744Binder.ReportUseSite(result, diagnostics, Location.None); 751Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__ctor, diagnostics, Location.None); 752Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__AllowMultiple, diagnostics, Location.None); 753Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__Inherited, diagnostics, Location.None);
Errors\MessageProvider.cs (2)
95return new CSDiagnostic(info, Location.None); 128Location.None,
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
786if (linqToArrayMethod.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(_compilation, _compilation.Conversions, Location.None, BindingDiagnosticBag.Discarded)) 994if (spanOfElementType.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(_compilation, _compilation.Conversions, Location.None, BindingDiagnosticBag.Discarded)))
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (2)
786else if (x == Location.None) 790else if (y == Location.None)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (3)
39: base(manager, Location.None) // Location is not needed since NameAndIndex is set explicitly below. 104Debug.Assert(SmallestLocation != Location.None); 164Debug.Assert(SmallestLocation != Location.None);
Symbols\MethodSymbol.cs (2)
1178if (type.Type.ContainsDynamic() && compilation.HasDynamicEmitAttributes(BindingDiagnosticBag.Discarded, Location.None)) 1188if (type.Type.ContainsTupleNames() && compilation.HasTupleNamesAttributes(BindingDiagnosticBag.Discarded, Location.None))
Symbols\Source\SourceAssemblySymbol.cs (1)
2221diagnostics.Add(useSiteInfo, useSiteInfo.DiagnosticInfo is object ? GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt) : Location.None))
Symbols\Source\SourceMemberContainerSymbol.cs (1)
2029ReportReservedTypeName(identifier?.Text, this.DeclaringCompilation, diagnostics.DiagnosticBag, identifier?.GetLocation() ?? Location.None);
Symbols\Source\SourceModuleSymbol.cs (1)
326Location.None,
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
848diagnostics.Add(useSiteInfo.Diagnostics.IsNullOrEmpty() ? Location.None : ((reportAtFirstLocation ? null : FindBaseRefSyntax(declaredBase)) ?? GetFirstLocation()), useSiteInfo);
Symbols\Symbol.cs (1)
430=> TryGetFirstLocation() ?? Location.None;
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (2)
64compilation.HasDynamicEmitAttributes(BindingDiagnosticBag.Discarded, Location.None) && 76compilation.HasTupleNamesAttributes(BindingDiagnosticBag.Discarded, Location.None) &&
Symbols\Synthesized\SynthesizedHotReloadExceptionConstructorSymbol.cs (2)
47Location.None, 62Location.None,
Symbols\Synthesized\SynthesizedParameterSymbol.cs (2)
154if (type.Type.ContainsDynamic() && compilation.HasDynamicEmitAttributes(BindingDiagnosticBag.Discarded, Location.None) && compilation.CanEmitBoolean()) 170compilation.HasTupleNamesAttributes(BindingDiagnosticBag.Discarded, Location.None) &&
Symbols\Tuples\TupleTypeSymbol.cs (1)
503diagnostics.Add(useSiteInfo, static syntax => syntax?.Location ?? Location.None, syntax);
Microsoft.CodeAnalysis.Features (15)
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
44return Diagnostic.Create(descriptor, Location.None, analyzerName, e.GetType(), e.Message);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
831Location.None,
EditAndContinue\DebuggingSession.cs (2)
297return (Mvid: Guid.Empty, Error: Diagnostic.Create(descriptor, Location.None, [outputs.AssemblyDisplayPath, e.Message])); 427diagnostics.Add(Diagnostic.Create(descriptor, Location.None, [fileBeingRead, e.Message]));
EditAndContinue\EditSession.cs (4)
144return Diagnostic.Create(descriptor, Location.None); 203yield return Location.None; 773Location.None, 783Location.None,
EditAndContinue\EmitSolutionUpdateResults.cs (1)
89Location.None,
EditAndContinue\RudeEditDiagnostic.cs (1)
44return Diagnostic.Create(descriptor, tree?.GetLocation(Span) ?? Location.None, Arguments);
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (4)
22/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 69/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 133/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 244/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param>
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
142context.ReportDiagnostic(Diagnostic.Create(s_enableGenerateDocumentationFileIdDescriptor, Location.None));
Microsoft.CodeAnalysis.Razor.Compiler (4)
SourceGenerators\Diagnostics\RazorDiagnostics.cs (1)
113location = Location.None;
SourceGenerators\RazorSourceGenerator.RazorProviders.cs (3)
72Location.None, 103Location.None, 141Location.None,
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
121location = Location.None; 187var diagnostic = Diagnostic.Create(rule, Location.None, properties, args);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
657return Location.None; 689return Location.None; 715return Location.None;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
30locations.Add(element.Locations.FirstOrDefault() ?? Location.None);
Microsoft.CodeAnalysis.Scripting (1)
Script.cs (1)
285diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_MetadataFileNotFound, Location.None, unresolved.Reference));
Microsoft.CodeAnalysis.VisualBasic (25)
Binding\Binder_Invocation.vb (1)
1901Dim msg = VisualBasicDiagnosticFormatter.Instance.Format(iDiagnostic.WithLocation(Location.None))
CodeGen\EmitStatement.vb (1)
1264If(local.Locations.FirstOrDefault(), Location.None),
CommandLine\CommandLineDiagnosticFormatter.vb (2)
44If diagnostic.Location <> Location.None Then 45diagnostic = diagnostic.WithLocation(Location.None)
CommandLine\VisualBasicCommandLineParser.vb (9)
1907Location.None)) 1931Location.None)) 1960Location.None)) 1977Location.None)) 2029diagnosticBuilder.Add(New DiagnosticWithInfo(ErrorFactory.ErrorInfo(ERRID.ERR_ConditionalCompilationConstantNotValid, diag, parsedTokensAsString.ToString), Location.None)) 2041Location.None)) 2062Location.None)) 2084Location.None)) 2094Location.None))
Compilation\DocumentationComments\DocumentationCommentCompiler.vb (1)
85diagnostics.Add(ERRID.ERR_DocFileGen, Location.None, ex.Message)
Compilation\MethodCompiler.vb (1)
2080diagnostics.Add(If(locations.IsDefaultOrEmpty, Location.None, locations(0)), useSiteInfo)
Compilation\VisualBasicCompilation.vb (3)
484diagnostics.Add(ERRID.ERR_DebugEntryPointNotSourceMethodDefinition, Location.None) 2957Dim loc = If(memberLocations.IsDefault, Location.None, memberLocations(i)) 2963fields.ToImmutableAndFree(), Location.None, isImplicitlyDeclared:=False)
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (1)
263diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_EncNoPIAReference, embeddedType.AdaptedNamedTypeSymbol), Location.None)
Errors\MessageProvider.vb (2)
93Return New VBDiagnostic(info, Location.None) 121Location.None,
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (2)
329ElseIf x = Location.None Then 331ElseIf y = Location.None Then
Symbols\Symbol.vb (1)
353Return If(Me.Locations.IsEmpty, Location.None, GetFirstLocation())
Symbols\SynthesizedSymbols\SynthesizedHotReloadExceptionConstructorSymbol.vb (1)
72Location.None,
Microsoft.CodeAnalysis.Workspaces (13)
CodeFixes\FixAllOccurrences\FixAllContext.cs (1)
171/// Use this overload when applying fix all to a diagnostic with no source location, i.e. <see cref="Location.None"/>.
Diagnostics\DiagnosticData.cs (1)
350var diagnostic = Diagnostic.Create(descriptor, Location.None, effectiveSeverity, additionalLocations: null, properties: null, messageArgs: messageArguments);
Diagnostics\Extensions.cs (3)
46return Location.None; 51return Location.None; 67return Location.None;
Diagnostics\FileContentLoadAnalyzer.cs (1)
36? textDocument.FilePath is null ? Location.None : Location.Create(textDocument.FilePath, textSpan: default, lineSpan: default)
FindSymbols\ReferenceLocation.cs (2)
60/// Otherwise, <see cref="Location.None"/>. 90: this(document, alias, location, isImplicit, symbolUsageInfo, additionalProperties, candidateReason, containingStringLocation: Location.None)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
312else if (location.ContainingStringLocation != Location.None)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
657return Location.None; 689return Location.None; 715return Location.None;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
30locations.Add(element.Locations.FirstOrDefault() ?? Location.None);
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\MembersMustExistAnalyzer.cs (1)
39context.ReportDiagnostic(Diagnostic.Create(s_memberMustExistDiagnostic, Location.None, missingAPI));
Microsoft.Gen.BuildMetadata.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
156TextSpan? expectedSpan = Location.None.SourceSpan; 157if (d.Location != Location.None) 172if (expectedSpan != Location.None.SourceSpan)
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
156TextSpan? expectedSpan = Location.None.SourceSpan; 157if (d.Location != Location.None) 172if (expectedSpan != Location.None.SourceSpan)
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
156TextSpan? expectedSpan = Location.None.SourceSpan; 157if (d.Location != Location.None) 172if (expectedSpan != Location.None.SourceSpan)
Microsoft.Gen.Logging.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
156TextSpan? expectedSpan = Location.None.SourceSpan; 157if (d.Location != Location.None) 172if (expectedSpan != Location.None.SourceSpan)
Microsoft.Gen.MetadataExtractor.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
156TextSpan? expectedSpan = Location.None.SourceSpan; 157if (d.Location != Location.None) 172if (expectedSpan != Location.None.SourceSpan)
Microsoft.Gen.Metrics.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
156TextSpan? expectedSpan = Location.None.SourceSpan; 157if (d.Location != Location.None) 172if (expectedSpan != Location.None.SourceSpan)
Microsoft.Gen.MetricsReports.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
156TextSpan? expectedSpan = Location.None.SourceSpan; 157if (d.Location != Location.None) 172if (expectedSpan != Location.None.SourceSpan)
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (1)
251DiagnosticInfo.Create(GeneratorDiagnostics.CannotAnalyzeInterfacePattern, sym.Locations.FirstOrDefault() ?? Location.None, sym.Name));
ComInterfaceInfo.cs (1)
170Location.None)
Microsoft.Interop.SourceGeneration (12)
DiagnosticExtensions.cs (10)
37: Location.None; 51: Location.None; 88Diagnostic.Create(descriptor, Location.None, properties: properties, args) : 99location: location.IsInSource ? location : Location.None, 111location: location.IsInSource ? location : Location.None, 141: Location.None; 155: Location.None; 192DiagnosticInfo.Create(descriptor, Location.None, properties: properties, args) : 203location: location.IsInSource ? location : Location.None, 215location: location.IsInSource ? location : Location.None,
MethodSignatureDiagnosticLocations.cs (1)
50return diagnostic.ToDiagnosticInfo(descriptor, Location.None, string.Empty);
TypePositionInfo.cs (1)
103return Location.None;
Roslyn.Diagnostics.Analyzers (6)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
121location = Location.None; 187var diagnostic = Diagnostic.Create(rule, Location.None, properties, args);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
657return Location.None; 689return Location.None; 715return Location.None;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (1)
30locations.Add(element.Locations.FirstOrDefault() ?? Location.None);
System.Windows.Forms.Analyzers (2)
System\Windows\Forms\Analyzers\AppManifestAnalyzer.cs (2)
67Location.None, 74Location.None,
System.Windows.Forms.Analyzers.CSharp (4)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ApplicationConfigurationGenerator.cs (1)
45Location.None, nameof(OutputKind.WindowsApplication)));
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ProjectFileReader.cs (3)
54Location.None, 90Location.None, 115Location.None,