264 references to None
Microsoft.CodeAnalysis (71)
CodeGen\LocalDefinition.cs (1)
101return Location.None;
CodeGen\SignatureOnlyLocalDefinition.cs (1)
70public Location Location => Location.None;
Collections\ImmutableArrayExtensions.cs (1)
879return items.IsEmpty ? Location.None : items[0];
CommandLine\AnalyzerConfigSet.cs (3)
445Location.None, 516Location.None, 539Location.None,
CommandLine\CommandLineArguments.cs (1)
432var diagnostic = PortableExecutableReference.ExceptionToDiagnostic(e, messageProviderOpt!, Location.None, cmdReference.Reference, cmdReference.Properties.Kind);
CommandLine\CommonCompiler.CompilerEmitStreamProvider.cs (1)
119diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_CantOpenFileWrite, Location.None, _filePath, e.Message));
CommandLine\CommonCompiler.cs (4)
1183diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.FTL_InvalidInputFileName, Location.None, finalPdbFilePath)); 1532diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_ErrorBuildingWin32Resource, Location.None, ex.Message)); 1566diagnostics.Add(messageProvider.CreateDiagnostic(errorCode, Location.None, fullPath, ex.Message)); 1577diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.FTL_InvalidInputFileName, Location.None, path ?? ""));
Compilation\Compilation.cs (16)
1969diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 1974diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 1979diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 2000diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 2093diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_ResourceNotUnique, Location.None, resource.ResourceName)); 2100diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_ResourceFileNameNotUnique, Location.None, fileName)); 2108diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_ResourceFileNameNotUnique, Location.None, fileName)); 2119diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_ResourceNotUnique, Location.None, name)); 3119diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_ResourceInModule, Location.None)); 3254diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PdbWritingFailed, Location.None, ex.Message)); 3259diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PeWritingFailure, Location.None, e.InnerException?.ToString() ?? "")); 3264diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_CantReadResource, Location.None, e.Message, e.InnerException?.Message ?? "")); 3269diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PermissionSetAttributeFileReadError, Location.None, e.FileName, e.PropertyName, e.Message)); 3423diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PdbWritingFailed, Location.None, e.Message)); 3428diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PeWritingFailure, Location.None, e.InnerException?.ToString() ?? "")); 3433diagnostics.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)
257diagnostics.Add(CreateDiagnostic(ERR_OutputWriteFailed, Location.None, filePath, e.Message));
Diagnostic\Diagnostic.cs (11)
43/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 58/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 79/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 100/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 127/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 159location: location ?? Location.None, 178/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 228/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 277severity, defaultSeverity, isEnabledByDefault, warningLevel, location ?? Location.None, additionalLocations, customTags, properties, isSuppressed); 292return new DiagnosticWithInfo(info, Location.None); 388/// Gets the primary location of the diagnostic, or <see cref="Location.None"/> if no primary location.
Diagnostic\Diagnostic_SimpleDiagnostic.cs (1)
49_location = location ?? Location.None;
Diagnostic\DiagnosticDescriptor.cs (1)
234var effectiveDiagnostic = compilationOptions.FilterDiagnostic(Diagnostic.Create(this, Location.None), CancellationToken.None);
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
1207return Diagnostic.Create(descriptor, Location.None, messageArguments); 1255return Diagnostic.Create(descriptor, Location.None, messageArguments);
Emit\EmitOptions.cs (6)
336diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidDebugInformationFormat, Location.None, (int)DebugInformationFormat)); 348diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidInstrumentationKind, Location.None, (int)instrumentationKind)); 359diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidFileAlignment, Location.None, FileAlignment)); 364diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidSubsystemVersion, Location.None, SubsystemVersion.ToString())); 375diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidHashAlgorithmName, Location.None, PdbChecksumAlgorithm.ToString())); 380diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_InvalidHashAlgorithmName, Location.None, ""));
MetadataReader\MetadataHelpers.cs (2)
924messageProvider.CreateDiagnostic(code, Location.None, 935messageProvider.CreateDiagnostic(code, Location.None,
PEWriter\Members.cs (1)
359/// Use <see cref="Location.None"/> rather than null.
PEWriter\MetadataWriter.cs (1)
1457return symbolOpt != null && !symbolOpt.Locations.IsDefaultOrEmpty ? symbolOpt.Locations[0] : Location.None;
PEWriter\TypeNameSerializer.cs (1)
86context.Location ?? Location.None));
ReferenceManager\CommonReferenceManager.Binding.cs (1)
285var existingReference = TryAddAssembly(resolvedAssemblyIdentity, resolvedReference, index, resolutionDiagnostics, Location.None, assemblyReferencesBySimpleName, supersedeLowerVersions);
ReferenceManager\CommonReferenceManager.Resolution.cs (3)
277location = Location.None; 547var metadata = GetMetadata(peReference, MessageProvider, Location.None, diagnostics); 559diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_MetadataFileNotAssembly, Location.None, peReference.Display ?? ""));
SourceGeneration\GeneratorDriver.cs (1)
362var diagnostic = Diagnostic.Create(descriptor, Location.None, generator.GetGeneratorType().Name, e.GetType().Name, e.Message);
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);
Syntax\SyntaxToken.cs (1)
650? Location.None
Microsoft.CodeAnalysis.CodeStyle (10)
DiagnosticHelper.cs (5)
24/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 68/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 112/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 161/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 213/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param>
J\s\src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs\ImmutableArrayExtensions.cs (1)
879return items.IsEmpty ? Location.None : items[0];
SymbolKey.SymbolKeyReader.cs (3)
674return Location.None; 706return Location.None; 732return Location.None;
SymbolKey.TupleTypeSymbolKey.cs (1)
32locations.Add(element.Locations.FirstOrDefault() ?? Location.None);
Microsoft.CodeAnalysis.CSharp (37)
Binder\InMethodBinder.cs (1)
248Debug.Assert(oldLocation != newLocation || oldLocation == Location.None || newLocation.SourceTree?.GetRoot().ContainsDiagnostics == true,
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
2900bool result = !_binder.MethodIsCompatibleWithDelegateOrFunctionPointer(node.ReceiverOpt, conv.IsExtensionMethod, conv.Method, delegateType, Location.None, BindingDiagnosticBag.Discarded);
CodeGen\EmitStatement.cs (1)
1748local.Locations.FirstOrDefault() ?? Location.None,
CommandLine\CSharpCommandLineParser.cs (1)
1525new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion())), Location.None));
Compilation\CSharpCompilation.cs (4)
513diagnostics.Add(ErrorCode.ERR_DebugEntryPointNotSourceMethodDefinition, Location.None); 2727new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion())), Location.None)); 3900var location = memberLocations.IsDefault ? Location.None : memberLocations[i]; 3905var descriptor = new AnonymousTypeDescriptor(fields.ToImmutableAndFree(), Location.None);
Compiler\DocumentationCommentCompiler.cs (1)
112diagnostics.Add(ErrorCode.ERR_DocFileGen, Location.None, e.Message);
Emitter\EditAndContinue\EmitHelpers.cs (1)
87diagnostics.Add(ErrorCode.ERR_EncUpdateFailedDelegateTypeChanged, Location.None);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (1)
343diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_EncNoPIAReference, embeddedType.AdaptedSymbol), Location.None);
Emitter\Model\PEAssemblyBuilder.cs (7)
326Compilation.CheckIfAttributeShouldBeEmbedded(EmbeddableAttributes.NullablePublicOnlyAttribute, diagnostics, Location.None)) 332Compilation.CheckIfAttributeShouldBeEmbedded(EmbeddableAttributes.RefSafetyRulesAttribute, diagnostics, Location.None)) 551Binder.ReportUseSite(result, diagnostics, Location.None); 558Binder.ReportUseSite(result, diagnostics, Location.None); 565Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__ctor, diagnostics, Location.None); 566Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__AllowMultiple, diagnostics, Location.None); 567Binder.GetWellKnownTypeMember(compilation, WellKnownMember.System_AttributeUsageAttribute__Inherited, diagnostics, Location.None);
Errors\MessageProvider.cs (2)
107return new CSDiagnostic(info, Location.None); 137Location.None,
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (4)
457var fields = key.Fields.SelectAsArray(f => new AnonymousTypeField(f.Name, Location.None, typeWithAnnotations: default, refKind: RefKind.None, ScopedKind.None)); 458var typeDescr = new AnonymousTypeDescriptor(fields, Location.None); 832else if (x == Location.None) 836else if (y == Location.None)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (3)
38: base(manager, Location.None) // Location is not needed since NameAndIndex is set explicitly below. 100Debug.Assert(SmallestLocation != Location.None); 157Debug.Assert(SmallestLocation != Location.None);
Symbols\MethodSymbol.cs (2)
1151if (type.Type.ContainsDynamic() && compilation.HasDynamicEmitAttributes(BindingDiagnosticBag.Discarded, Location.None)) 1161if (type.Type.ContainsTupleNames() && compilation.HasTupleNamesAttributes(BindingDiagnosticBag.Discarded, Location.None))
Symbols\Source\SourceAssemblySymbol.cs (1)
2193diagnostics.Add(useSiteInfo, useSiteInfo.DiagnosticInfo is object ? GetAssemblyAttributeLocationForDiagnostic(arguments.AttributeSyntaxOpt) : Location.None))
Symbols\Source\SourceMemberContainerSymbol.cs (1)
1769ReportReservedTypeName(identifier?.Text, this.DeclaringCompilation, diagnostics.DiagnosticBag, identifier?.GetLocation() ?? Location.None);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
777diagnostics.Add(useSiteInfo.Diagnostics.IsNullOrEmpty() ? Location.None : (FindBaseRefSyntax(declaredBase) ?? Locations[0]), useSiteInfo);
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (2)
62compilation.HasDynamicEmitAttributes(BindingDiagnosticBag.Discarded, Location.None) && 74compilation.HasTupleNamesAttributes(BindingDiagnosticBag.Discarded, Location.None) &&
Symbols\Synthesized\SynthesizedParameterSymbol.cs (2)
151if (type.Type.ContainsDynamic() && compilation.HasDynamicEmitAttributes(BindingDiagnosticBag.Discarded, Location.None) && compilation.CanEmitBoolean()) 167compilation.HasTupleNamesAttributes(BindingDiagnosticBag.Discarded, Location.None) &&
Symbols\Tuples\TupleTypeSymbol.cs (1)
510diagnostics.Add(useSiteInfo, syntax?.GetLocation() ?? Location.None);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
12248new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_LowercaseEllSuffix), Location.None).GetMessage(CultureInfo.InvariantCulture), 12288new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_EmptySwitch), Location.None).GetMessage(CultureInfo.InvariantCulture), 12344new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_UnreferencedField, "C.f"), Location.None).GetMessage(CultureInfo.InvariantCulture),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Diagnostics\Suppression\RemoveSuppressionTests.cs (1)
49var location = _reportDiagnosticsWithoutLocation ? Location.None : classDecl.Identifier.GetLocation();
Diagnostics\Suppression\SuppressionTests.cs (1)
2464=> context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (16)
Diagnostics\DiagnosticAnalyzerTests.cs (16)
307var noneDiag = CodeAnalysis.Diagnostic.Create(noneDiagDescriptor, Location.None); 308var infoDiag = CodeAnalysis.Diagnostic.Create(infoDiagDescriptor, Location.None); 309var warningDiag = CodeAnalysis.Diagnostic.Create(warningDiagDescriptor, Location.None); 310var errorDiag = CodeAnalysis.Diagnostic.Create(errorDiagDescriptor, Location.None); 391var noneDiag = Microsoft.CodeAnalysis.Diagnostic.Create(noneDiagDescriptor, Location.None); 392var infoDiag = Microsoft.CodeAnalysis.Diagnostic.Create(infoDiagDescriptor, Location.None); 393var warningDiag = Microsoft.CodeAnalysis.Diagnostic.Create(warningDiagDescriptor, Location.None); 394var errorDiag = Microsoft.CodeAnalysis.Diagnostic.Create(errorDiagDescriptor, Location.None); 444var disabledDiag = CodeAnalysis.Diagnostic.Create(disabledDiagDescriptor, Location.None); 445var enabledDiag = CodeAnalysis.Diagnostic.Create(enabledDiagDescriptor, Location.None); 783context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor1, Location.None)); 798registerSyntaxNodeAction(context => { context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor2, Location.None)); }, 801registerSyntaxNodeAction(context => { context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor3, Location.None)); }, 820context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(descriptor, Location.None)); 894compilationContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(UnsupportedDescriptor, Location.None)); 2335var diagnostic = CodeAnalysis.Diagnostic.Create(Summary, Location.None, sortedCallbackEntityNames.Join(","));
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (5)
CompilationExtensions.cs (2)
121var bytes = builder.Count > 0 && compilation.HasDynamicEmitAttributes(BindingDiagnosticBag.Discarded, Location.None) 133var names = CSharpCompilation.TupleNamesEncoder.TryGetNames(type, builder) && compilation.HasTupleNamesAttributes(BindingDiagnosticBag.Discarded, Location.None)
EvaluationContext.cs (1)
340diagnostics.Add(ErrorCode.ERR_ExpressionOrDeclarationExpected, Location.None);
Symbols\EELocalConstantSymbol.cs (1)
91diagnostics.Add(ErrorCode.ERR_BadPdbData, Location.None, Name);
SyntaxHelpers.cs (1)
176diagnostics.Add(ErrorCode.ERR_InvalidSpecifier, Location.None, token);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (2)
MissingAssemblyTests.cs (2)
657diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_NoTypeDef, "MissingType", missingIdentity), Location.None)); 704diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_NoTypeDef, "MissingType", missingIdentity), Location.None));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
SourceGeneration\GeneratorDriverTests.cs (7)
446var diagnostic = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic, Location.None); 658var diagnostic1 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic1, Location.None); 659var diagnostic2 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic2, Location.None); 660var diagnostic3 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic3, Location.None); 705var diagnostic1 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic1, Location.None); 706var diagnostic2 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic2, Location.None); 707var diagnostic3 = Microsoft.CodeAnalysis.Diagnostic.Create(generatorDiagnostic3, Location.None);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\CompilationAPITests.cs (4)
2536memberLocations: ImmutableArray.Create(Location.None))); 2560memberLocations: ImmutableArray.Create(Location.None, null))); 2615loc => Assert.Equal(loc, Location.None)); 2651loc => Assert.Equal(loc, Location.None));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Parsing\ParserErrorMessageTests.cs (1)
2634Assert.Equal("error CS1029: #error: '\u0444\u0430\u0439\u043B'", CSharpDiagnosticFormatter.Instance.Format(error.WithLocation(Location.None), EnsureEnglishUICulture.PreferredOrNull));
Syntax\SyntaxFactoryTests.cs (3)
413Assert.Equal(Location.None, literal.GetLocation()); 427Assert.Equal(Location.None, literal.GetLocation()); 465Assert.Equal(Location.None, token.GetLocation());
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
221var projectDiagnostic = Diagnostic.Create(diagnosticDescriptor1, Location.None, new[] { "proj", "some error" });
EditAndContinue\TraceLogTests.cs (1)
20var diagnostic = Diagnostic.Create(EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.ErrorReadingFile), Location.None, "file", "error");
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Diagnostics\DiagnosticServiceTests.vb (2)
1783context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None)) 1822context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None, _symbolNames.Count))
Microsoft.CodeAnalysis.Features (10)
DiagnosticHelper.cs (5)
24/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 68/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 112/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 161/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param> 213/// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param>
EditAndContinue\DebuggingSession.cs (2)
279return (Mvid: Guid.Empty, Error: Diagnostic.Create(descriptor, Location.None, new[] { outputs.AssemblyDisplayPath, e.Message })); 423diagnostics = ImmutableArray.Create(Diagnostic.Create(descriptor, Location.None, new[] { fileBeingRead, e.Message }));
EditAndContinue\EditSession.cs (2)
146return Diagnostic.Create(descriptor, Location.None); 214yield return Location.None;
EditAndContinue\Remote\RemoteDebuggingSessionProxy.cs (1)
153Location.None,
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
71return Diagnostic.Create(descriptor, Location.None, analyzerName, e.GetType(), e.Message);
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\EditAndContinue\RemoteEditAndContinueService.cs (1)
161var diagnostic = Diagnostic.Create(descriptor, Location.None, new[] { e.Message });
Microsoft.CodeAnalysis.Scripting (1)
Script.cs (1)
285diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_MetadataFileNotFound, Location.None, unresolved.Reference));
Microsoft.CodeAnalysis.Test.Utilities (22)
Diagnostics\CommonDiagnosticAnalyzers.cs (21)
76context.ReportDiagnostic(Diagnostic.Create(Descriptor2, Location.None, s_properties))); 478compilationContext.ReportDiagnostic(Diagnostic.Create(EnabledRule, Location.None)); 481compilationContext.ReportDiagnostic(Diagnostic.Create(DisabledRule, Location.None)); 739compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 770compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 791compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 867Diagnostic.Create(Descriptor, Location.None, additionalLocations: new[] { _invalidLocation }) : 1543var diagnostic = Diagnostic.Create(rule, Location.None, args); 1713var diagnostic = Diagnostic.Create(descriptor, Location.None, treeContext.Tree.FilePath); 1717diagnostic = Diagnostic.Create(UniqueTextFileDescriptor, Location.None, treeContext.Tree.FilePath); 1728var diagnostic = Diagnostic.Create(NumberOfUniqueTextFileDescriptor, Location.None, _textCallbackSet.Count); 1924compilationEndContext.ReportDiagnostic(Diagnostic.Create(SymbolStartedEndedDifferRule, Location.None, symbolsStartedStr, symbolsEndedStr, _analyzerId)); 1939diagnostics.Add(Diagnostic.Create(DuplicateStartActionRule, Location.None, symbolStartContext.Symbol.Name, _analyzerId)); 1949diagnostics.Add(Diagnostic.Create(DuplicateEndActionRule, Location.None, symbolEndContext.Symbol.Name, _analyzerId)); 1954symbolEndContext.ReportDiagnostic(Diagnostic.Create(rule, Location.None, symbolStartContext.Symbol.Name, _analyzerId)); 1964operationContext.ReportDiagnostic(Diagnostic.Create(OperationRule, Location.None, symbolStartContext.Symbol.Name, operationContext.ContainingSymbol.Name, operationContext.Operation.Syntax.ToString(), _analyzerId)); 2000diagnostics.Add(Diagnostic.Create(SymbolStartedOrderingRule, Location.None, member, symbolStarted, _analyzerId)); 2024diagnostics.Add(Diagnostic.Create(SymbolEndedOrderingRule, Location.None, container, symbolEnded, _analyzerId)); 2039diagnostics.Add(Diagnostic.Create(OperationOrderingRule, Location.None, symbolStartContext.Symbol, operationContext.Operation.Syntax.ToString(), _analyzerId)); 2309Diagnostic.Create(_rule, Location.None, GetSortedSymbolCallbacksString()))); 2340compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None)));
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (1)
43context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, Location.None, messageArgs: Id));
Microsoft.CodeAnalysis.UnitTests (3)
Diagnostics\DiagnosticCreationTests.cs (1)
20var diagnostic = Diagnostic.Create(descriptor, Location.None, effectiveSeverity, additionalLocations: null, properties: null);
Diagnostics\DiagnosticLocalizationTests.cs (1)
87var localizableDiagnostic = Diagnostic.Create(descriptor, Location.None);
Diagnostics\SarifErrorLoggerTests.cs (1)
82logger.LogDiagnostic(Diagnostic.Create(descriptor, Location.None), null);
Microsoft.CodeAnalysis.VisualBasic (25)
Binding\Binder_Invocation.vb (1)
1903Dim msg = VisualBasicDiagnosticFormatter.Instance.Format(iDiagnostic.WithLocation(Location.None))
CodeGen\EmitStatement.vb (1)
1263If(local.Locations.FirstOrDefault(), Location.None),
CommandLine\CommandLineDiagnosticFormatter.vb (2)
44If diagnostic.Location <> Location.None Then 45diagnostic = diagnostic.WithLocation(Location.None)
CommandLine\VisualBasicCommandLineParser.vb (9)
1871Location.None)) 1895Location.None)) 1924Location.None)) 1941Location.None)) 1993diagnosticBuilder.Add(New DiagnosticWithInfo(ErrorFactory.ErrorInfo(ERRID.ERR_ConditionalCompilationConstantNotValid, diag, parsedTokensAsString.ToString), Location.None)) 2005Location.None)) 2026Location.None)) 2048Location.None)) 2058Location.None))
Compilation\DocumentationComments\DocumentationCommentCompiler.vb (1)
85diagnostics.Add(ERRID.ERR_DocFileGen, Location.None, ex.Message)
Compilation\MethodCompiler.vb (1)
1944diagnostics.Add(If(locations.IsDefaultOrEmpty, Location.None, locations(0)), useSiteInfo)
Compilation\VisualBasicCompilation.vb (3)
481diagnostics.Add(ERRID.ERR_DebugEntryPointNotSourceMethodDefinition, Location.None) 2906Dim loc = If(memberLocations.IsDefault, Location.None, memberLocations(i)) 2912fields.ToImmutableAndFree(), Location.None, isImplicitlyDeclared:=False)
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (1)
289diagnostics.Add(ErrorFactory.ErrorInfo(ERRID.ERR_EncNoPIAReference, embeddedType.AdaptedNamedTypeSymbol), Location.None)
Errors\MessageProvider.vb (2)
108Return New VBDiagnostic(info, Location.None) 136Location.None,
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (4)
165Dim names = key.Fields.SelectAsArray(Function(f) New AnonymousTypeField(f.Name, Location.None, f.IsKey)) 166Return New AnonymousTypeDescriptor(names, Location.None, True) 338ElseIf x = Location.None Then 340ElseIf y = Location.None Then
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (2)
CommandLineTests.vb (2)
9675New VBDiagnostic(ErrorFactory.ErrorInfo(ERRID.WRN_UseOfObsoleteSymbolNoMessage1, "C"), Location.None).GetMessage(CultureInfo.InvariantCulture), 9732New VBDiagnostic(ErrorFactory.ErrorInfo(ERRID.WRN_UseOfObsoleteSymbolNoMessage1, "C"), Location.None).GetMessage(CultureInfo.InvariantCulture),
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler (1)
SyntaxHelpers.vb (1)
142diagnostics.Add(ERRID.ERR_InvalidFormatSpecifier, Location.None, token)
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler.UnitTests (1)
MissingAssemblyTests.vb (1)
529diagnostics.Add(New VBDiagnostic(ErrorFactory.ErrorInfo(ERRID.ERR_UnreferencedAssembly3, missingIdentity, "MissingType"), Location.None))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (15)
Compilation\CompilationAPITests.vb (5)
1578memberLocations:=ImmutableArray.Create(Location.None)) 1594Sub(loc) Assert.Equal(loc, Location.None)) 1641Sub(loc) Assert.Equal(loc, Location.None)) 1656Sub(loc) Assert.Equal(loc, Location.None)) 1670Sub(loc) Assert.Equal(loc, Location.None))
Diagnostics\DiagnosticAnalyzerTests.vb (10)
54Dim noneDiag = Microsoft.CodeAnalysis.Diagnostic.Create(noneDiagDescriptor, Location.None) 55Dim infoDiag = Microsoft.CodeAnalysis.Diagnostic.Create(infoDiagDescriptor, Location.None) 56Dim warningDiag = Microsoft.CodeAnalysis.Diagnostic.Create(warningDiagDescriptor, Location.None) 57Dim errorDiag = Microsoft.CodeAnalysis.Diagnostic.Create(errorDiagDescriptor, Location.None) 135Dim noneDiag = Microsoft.CodeAnalysis.Diagnostic.Create(noneDiagDescriptor, Location.None) 136Dim infoDiag = Microsoft.CodeAnalysis.Diagnostic.Create(infoDiagDescriptor, Location.None) 137Dim warningDiag = Microsoft.CodeAnalysis.Diagnostic.Create(warningDiagDescriptor, Location.None) 138Dim errorDiag = Microsoft.CodeAnalysis.Diagnostic.Create(errorDiagDescriptor, Location.None) 188Dim disabledDiag = CodeAnalysis.Diagnostic.Create(disabledDiagDescriptor, Location.None) 189Dim enabledDiag = CodeAnalysis.Diagnostic.Create(enabledDiagDescriptor, Location.None)
Microsoft.CodeAnalysis.Workspaces (14)
CodeFixes\FixAllOccurrences\FixAllContext.cs (1)
174/// Use this overload when applying fix all to a diagnostic with no source location, i.e. <see cref="Location.None"/>.
Diagnostics\DiagnosticData.cs (1)
330var diagnostic = Diagnostic.Create(descriptor, Location.None, effectiveSeverity, additionalLocations: null, properties: null, messageArgs: messageArguments);
Diagnostics\Extensions.cs (3)
43return Location.None; 48return Location.None; 64return Location.None;
FindSymbols\ReferenceLocation.cs (2)
60/// Otherwise, <see cref="Location.None"/>. 90: this(document, alias, location, isImplicit, symbolUsageInfo, additionalProperties, candidateReason, containingStringLocation: Location.None)
J\s\src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs\ImmutableArrayExtensions.cs (1)
879return items.IsEmpty ? Location.None : items[0];
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
289else if (location.ContainingStringLocation != Location.None)
SymbolKey.SymbolKeyReader.cs (3)
674return Location.None; 706return Location.None; 732return Location.None;
SymbolKey.TupleTypeSymbolKey.cs (1)
32locations.Add(element.Locations.FirstOrDefault() ?? Location.None);
Workspace\Solution\TextLoader.cs (1)
160location = Location.None;
Microsoft.VisualStudio.LanguageServices (2)
Diagnostics\VisualStudioVenusSpanMappingService.cs (1)
38if (location == Location.None)
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
603/// Project level diagnostics are diagnostics that have no document location, i.e. reported with <see cref="Location.None"/>.
Microsoft.VisualStudio.LanguageServices.Implementation (1)
SolutionExplorer\DiagnosticItem\DiagnosticItem.cs (1)
89var diagnostic = Diagnostic.Create(Descriptor, Location.None, effectiveSeverity, additionalLocations: null, properties: null);