4 instantiations of DiagnosticBag
Microsoft.CodeAnalysis (4)
Binding\BindingDiagnosticBag.cs (1)
72: this(usePool ? DiagnosticBag.GetInstance() : new DiagnosticBag(), usePool ? PooledHashSet<TAssemblySymbol>.GetInstance() : new HashSet<TAssemblySymbol>())
CommandLine\CommonCompiler.cs (1)
1517var analyzerExceptionDiagnostics = new DiagnosticBag();
Diagnostic\DiagnosticBag.cs (1)
339return new ObjectPool<DiagnosticBag>(() => new DiagnosticBag(), size);
SourceGeneration\GeneratorContexts.cs (1)
34_diagnostics = new DiagnosticBag();
262 references to DiagnosticBag
Microsoft.CodeAnalysis (225)
Binding\BindingDiagnosticBag.cs (7)
21public readonly DiagnosticBag? DiagnosticBag; 23protected BindingDiagnosticBag(DiagnosticBag? diagnosticBag) 64protected BindingDiagnosticBag(DiagnosticBag? diagnosticBag, ICollection<TAssemblySymbol>? dependenciesBag) 72: this(usePool ? DiagnosticBag.GetInstance() : new DiagnosticBag(), usePool ? PooledHashSet<TAssemblySymbol>.GetInstance() : new HashSet<TAssemblySymbol>()) 124internal void AddRange(DiagnosticBag? bag) 225if (DiagnosticBag is DiagnosticBag diagnosticBag) 271protected abstract bool ReportUseSiteDiagnostic(DiagnosticInfo diagnosticInfo, DiagnosticBag diagnosticBag, Location location);
CodeGen\ILBuilderEmit.cs (7)
49internal void EmitToken(Cci.IReference value, SyntaxNode? syntaxNode, DiagnosticBag diagnostics, Cci.MetadataWriter.RawTokenEncoding encoding = 0) 59internal void EmitToken(Cci.ISignature value, SyntaxNode? syntaxNode, DiagnosticBag diagnostics) 83internal void EmitArrayBlockInitializer(ImmutableArray<byte> data, SyntaxNode syntaxNode, DiagnosticBag diagnostics) 363internal void EmitArrayCreation(Microsoft.Cci.IArrayTypeReference arrayType, SyntaxNode syntaxNode, DiagnosticBag diagnostics) 377internal void EmitArrayElementLoad(Microsoft.Cci.IArrayTypeReference arrayType, SyntaxNode syntaxNode, DiagnosticBag diagnostics) 391internal void EmitArrayElementAddress(Microsoft.Cci.IArrayTypeReference arrayType, SyntaxNode syntaxNode, DiagnosticBag diagnostics) 405internal void EmitArrayElementStore(Cci.IArrayTypeReference arrayType, SyntaxNode syntaxNode, DiagnosticBag diagnostics)
CodeGen\ITokenDeferral.cs (5)
12uint GetFakeSymbolTokenForIL(Cci.IReference value, SyntaxNode? syntaxNode, DiagnosticBag diagnostics); 13uint GetFakeSymbolTokenForIL(Cci.ISignature value, SyntaxNode? syntaxNode, DiagnosticBag diagnostics); 16Cci.IFieldReference GetFieldForData(ImmutableArray<byte> data, ushort alignment, SyntaxNode syntaxNode, DiagnosticBag diagnostics); 20Cci.IFieldReference GetArrayCachingFieldForData(ImmutableArray<byte> data, Cci.IArrayTypeReference arrayType, SyntaxNode syntaxNode, DiagnosticBag diagnostics); 22Cci.IFieldReference GetArrayCachingFieldForConstants(ImmutableArray<ConstantValue> constants, Cci.IArrayTypeReference arrayType, SyntaxNode syntaxNode, DiagnosticBag diagnostics);
CodeGen\VariableSlotAllocator.cs (2)
39DiagnosticBag diagnostics, 54public abstract bool TryGetPreviousAwaiterSlotIndex(Cci.ITypeReference currentType, DiagnosticBag diagnostics, out int slotIndex);
CommandLine\AnalyzerConfigSet.cs (4)
456DiagnosticBag diagnosticBag = DiagnosticBag.GetInstance(); 483internal void MergeIntoGlobalConfig(AnalyzerConfig config, DiagnosticBag diagnostics) 512internal GlobalAnalyzerConfig Build(DiagnosticBag diagnostics)
CommandLine\CommonCompiler.CompilerEmitStreamProvider.cs (3)
35public void Close(DiagnosticBag diagnostics) 49protected override Stream? CreateStream(DiagnosticBag diagnostics) 115private void ReportOpenFileDiagnostic(DiagnosticBag diagnostics, Exception e)
CommandLine\CommonCompiler.cs (27)
298DiagnosticBag diagnostics, 367private string? TryReadFileContent(string filePath, DiagnosticBag diagnostics, out string? normalizedPath) 398internal EmbeddedText? TryReadEmbeddedFileContent(string filePath, DiagnosticBag diagnostics) 424private ImmutableArray<EmbeddedText?> AcquireEmbeddedTexts(Compilation compilation, DiagnosticBag diagnostics) 485DiagnosticBag diagnostics); 597private bool ReportDiagnostics(DiagnosticBag diagnostics, TextWriter consoleOutput, ErrorLogger? errorLoggerOpt, Compilation? compilation) 672internal static bool HasUnsuppressableErrors(DiagnosticBag diagnostics) 684internal static bool HasSuppressableWarningsOrErrors(DiagnosticBag diagnostics) 700internal static bool HasUnsuppressedErrors(DiagnosticBag diagnostics) 722var diagnostics = DiagnosticBag.GetInstance(); 820DiagnosticBag generatorDiagnostics) 915var diagnostics = DiagnosticBag.GetInstance(); 1059DiagnosticBag diagnostics, 1103DiagnosticBag diagnostics, 1117DiagnosticBag? analyzerExceptionDiagnostics = null; 1514(CancellationTokenSource, DiagnosticBag, AnalyzerDriver) initializeAnalyzerDriver(AnalyzerOptions analyzerOptions, ref Compilation compilation) 1517var analyzerExceptionDiagnostics = new DiagnosticBag(); 1550private bool WriteTouchedFiles(DiagnosticBag diagnostics, TouchedFileLogger? touchedFilesLogger, string? finalXmlFilePath) 1622DiagnosticBag diagnostics, 1646var diagnostics = DiagnosticBag.GetInstance(); 1657DiagnosticBag diagnostics) 1682private static Stream? OpenManifestStream(ICommonCompilerFileSystem fileSystem, CommonMessageProvider messageProvider, OutputKind outputKind, CommandLineArguments arguments, DiagnosticBag diagnostics) 1689private static Stream? OpenStream(ICommonCompilerFileSystem fileSystem, CommonMessageProvider messageProvider, string? path, string? baseDirectory, int errorCode, DiagnosticBag diagnostics) 1714private static string? ResolveRelativePath(CommonMessageProvider messageProvider, string path, string? baseDirectory, DiagnosticBag diagnostics)
CommandLine\NoThrowStreamDisposer.cs (2)
21private readonly DiagnosticBag _diagnostics; 44DiagnosticBag diagnostics,
Compilation.EmitStream.cs (3)
68internal Func<Stream?> GetCreateStreamFunc(CommonMessageProvider messageProvider, DiagnosticBag diagnostics) 105private Stream? CreateStream(CommonMessageProvider messageProvider, DiagnosticBag diagnostics) 166internal bool Complete(CommonMessageProvider messageProvider, DiagnosticBag diagnostics)
Compilation.EmitStreamProvider.cs (3)
41protected abstract Stream? CreateStream(DiagnosticBag diagnostics); 47public Stream? GetOrCreateStream(DiagnosticBag diagnostics) 66protected override Stream CreateStream(DiagnosticBag diagnostics)
Compilation\Compilation.cs (32)
407internal void CheckAssemblyName(DiagnosticBag diagnostics) 1789internal abstract void GetDiagnostics(CompilationStage stage, bool includeEarlierStages, DiagnosticBag diagnostics, CancellationToken cancellationToken = default); 1861internal bool FilterAndAppendAndFreeDiagnostics(DiagnosticBag accumulator, [DisallowNull] ref DiagnosticBag? incoming, CancellationToken cancellationToken) 1870internal bool FilterAndAppendDiagnostics(DiagnosticBag accumulator, DiagnosticBag incoming, CancellationToken cancellationToken) 1881internal bool FilterAndAppendDiagnostics(DiagnosticBag accumulator, IEnumerable<Diagnostic> incoming, HashSet<int>? exclude, CancellationToken cancellationToken) 2006internal Cci.ResourceSection? MakeWin32ResourcesFromCOFF(Stream? win32Resources, DiagnosticBag diagnostics) 2038internal List<Win32Resource>? MakeWin32ResourceList(Stream? win32Resources, DiagnosticBag diagnostics) 2083internal void SetupWin32Resources(CommonPEModuleBuilder moduleBeingBuilt, Stream? win32Resources, bool useRawWin32Resources, DiagnosticBag diagnostics) 2129DiagnosticBag diagnostics) 2477DiagnosticBag diagnostics, 2487DiagnosticBag diagnostics, 2491internal bool CreateDebugDocuments(DebugDocumentsBuilder documentsBuilder, IEnumerable<EmbeddedText> embeddedTexts, DiagnosticBag diagnostics) 2563internal abstract void AddDebugSourceDocumentsForChecksumDirectives(DebugDocumentsBuilder documentsBuilder, SyntaxTree tree, DiagnosticBag diagnostics); 2573DiagnosticBag diagnostics, 2583DiagnosticBag diagnostics, 2590DiagnosticBag diagnostics, 2612DiagnosticBag diagnostics, 2639var discardedDiagnostics = DiagnosticBag.GetInstance(); 2949var diagnostics = DiagnosticBag.GetInstance(); 3148DiagnosticBag diagnostics, 3201internal abstract void ValidateDebugEntryPoint(IMethodSymbol debugEntryPoint, DiagnosticBag diagnostics); 3212DiagnosticBag diagnostics, 3220DiagnosticBag? metadataDiagnostics = null; 3221DiagnosticBag? pdbBag = null; 3255metadataDiagnostics = DiagnosticBag.GetInstance(); 3345private static Stream? ConditionalGetOrCreateStream(EmitStreamProvider metadataPEStreamProvider, DiagnosticBag metadataDiagnostics) 3359DiagnosticBag metadataDiagnostics, 3429DiagnosticBag diagnostics,
Diagnostic\CommonMessageProvider.cs (17)
210public abstract void ReportDuplicateMetadataReferenceStrong(DiagnosticBag diagnostics, Location location, MetadataReference reference, AssemblyIdentity identity, MetadataReference equivalentReference, AssemblyIdentity equivalentIdentity); 211public abstract void ReportDuplicateMetadataReferenceWeak(DiagnosticBag diagnostics, Location location, MetadataReference reference, AssemblyIdentity identity, MetadataReference equivalentReference, AssemblyIdentity equivalentIdentity); 255public void ReportStreamWriteException(Exception e, string filePath, DiagnosticBag diagnostics) 260protected abstract void ReportInvalidAttributeArgument(DiagnosticBag diagnostics, SyntaxNode attributeSyntax, int parameterIndex, AttributeData attribute); 264if (diagnostics.DiagnosticBag is DiagnosticBag diagnosticBag) 270protected abstract void ReportInvalidNamedArgument(DiagnosticBag diagnostics, SyntaxNode attributeSyntax, int namedArgumentIndex, ITypeSymbol attributeClass, string parameterName); 274if (diagnostics.DiagnosticBag is DiagnosticBag diagnosticBag) 280protected abstract void ReportParameterNotValidForType(DiagnosticBag diagnostics, SyntaxNode attributeSyntax, int namedArgumentIndex); 284if (diagnostics.DiagnosticBag is DiagnosticBag diagnosticBag) 290protected abstract void ReportMarshalUnmanagedTypeNotValidForFields(DiagnosticBag diagnostics, SyntaxNode attributeSyntax, int parameterIndex, string unmanagedTypeName, AttributeData attribute); 294if (diagnostics.DiagnosticBag is DiagnosticBag diagnosticBag) 300protected abstract void ReportMarshalUnmanagedTypeOnlyValidForFields(DiagnosticBag diagnostics, SyntaxNode attributeSyntax, int parameterIndex, string unmanagedTypeName, AttributeData attribute); 304if (diagnostics.DiagnosticBag is DiagnosticBag diagnosticBag) 310protected abstract void ReportAttributeParameterRequired(DiagnosticBag diagnostics, SyntaxNode attributeSyntax, string parameterName); 314if (diagnostics.DiagnosticBag is DiagnosticBag diagnosticBag) 320protected abstract void ReportAttributeParameterRequired(DiagnosticBag diagnostics, SyntaxNode attributeSyntax, string parameterName1, string parameterName2); 324if (diagnostics.DiagnosticBag is DiagnosticBag diagnosticBag)
Diagnostic\DiagnosticBag.cs (9)
149public void AddRange(DiagnosticBag bag) 160public void AddRangeAndFree(DiagnosticBag bag) 324internal static DiagnosticBag GetInstance() 326DiagnosticBag bag = s_poolInstance.Allocate(); 336private static readonly ObjectPool<DiagnosticBag> s_poolInstance = CreatePool(128); 337private static ObjectPool<DiagnosticBag> CreatePool(int size) 339return new ObjectPool<DiagnosticBag>(() => new DiagnosticBag(), size); 348private readonly DiagnosticBag _bag; 350public DebuggerProxy(DiagnosticBag bag)
DiagnosticAnalyzer\AnalyzerDriver.cs (3)
866var allDiagnostics = DiagnosticBag.GetInstance(); 1012public void ApplyProgrammaticSuppressions(DiagnosticBag reportedDiagnostics, Compilation compilation, CancellationToken cancellationToken)
Emit\CommonPEModuleBuilder.cs (31)
121internal abstract Cci.IAssemblyReference Translate(IAssemblySymbolInternal symbol, DiagnosticBag diagnostics); 122internal abstract Cci.ITypeReference Translate(ITypeSymbolInternal symbol, SyntaxNode syntaxOpt, DiagnosticBag diagnostics); 123internal abstract Cci.IMethodReference Translate(IMethodSymbolInternal symbol, DiagnosticBag diagnostics, bool needDeclaration); 131internal abstract Cci.ITypeReference EncTranslateType(ITypeSymbolInternal type, DiagnosticBag diagnostics); 141public abstract ImmutableArray<Cci.ExportedType> GetExportedTypes(DiagnosticBag diagnostics); 173protected abstract IEnumerable<Cci.IAssemblyReference> GetAssemblyReferencesFromAddedModules(DiagnosticBag diagnostics); 174protected abstract void AddEmbeddedResourcesFromAddedModules(ArrayBuilder<Cci.ManagedResource> builder, DiagnosticBag diagnostics); 354internal void SetPEEntryPoint(IMethodSymbolInternal method, DiagnosticBag diagnostics) 362internal void SetDebugEntryPoint(IMethodSymbolInternal method, DiagnosticBag diagnostics) 395public uint GetFakeSymbolTokenForIL(Cci.IReference symbol, SyntaxNode syntaxNode, DiagnosticBag diagnostics) 405public uint GetFakeSymbolTokenForIL(Cci.ISignature symbol, SyntaxNode syntaxNode, DiagnosticBag diagnostics) 631internal abstract Cci.INamedTypeReference GetSpecialType(SpecialType specialType, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 633internal sealed override Cci.ITypeReference EncTranslateType(ITypeSymbolInternal type, DiagnosticBag diagnostics) 638internal virtual Cci.ITypeReference EncTranslateLocalVariableType(TTypeSymbol type, DiagnosticBag diagnostics) 718public virtual ImmutableArray<TNamedTypeSymbol> GetEmbeddedTypes(DiagnosticBag diagnostics) 721internal abstract Cci.IAssemblyReference Translate(TAssemblySymbol symbol, DiagnosticBag diagnostics); 722internal abstract Cci.ITypeReference Translate(TTypeSymbol symbol, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 723internal abstract Cci.IMethodReference Translate(TMethodSymbol symbol, DiagnosticBag diagnostics, bool needDeclaration); 725internal sealed override Cci.IAssemblyReference Translate(IAssemblySymbolInternal symbol, DiagnosticBag diagnostics) 730internal sealed override Cci.ITypeReference Translate(ITypeSymbolInternal symbol, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 735internal sealed override Cci.IMethodReference Translate(IMethodSymbolInternal symbol, DiagnosticBag diagnostics, bool needDeclaration) 749DiagnosticBag diagnostics) 759internal Cci.IFieldReference GetModuleVersionId(Cci.ITypeReference mvidType, TSyntaxNode syntaxOpt, DiagnosticBag diagnostics) 767internal Cci.IFieldReference GetModuleCancellationToken(Cci.ITypeReference cancellationTokenType, TSyntaxNode syntaxOpt, DiagnosticBag diagnostics) 770internal Cci.IFieldReference GetInstrumentationPayloadRoot(int analysisKind, Cci.ITypeReference payloadType, TSyntaxNode syntaxOpt, DiagnosticBag diagnostics) 778private void EnsurePrivateImplementationDetailsStaticConstructor(PrivateImplementationDetails details, TSyntaxNode syntaxOpt, DiagnosticBag diagnostics) 789protected abstract Cci.IMethodDefinition CreatePrivateImplementationDetailsStaticConstructor(TSyntaxNode syntaxOpt, DiagnosticBag diagnostics); 1020Cci.IFieldReference ITokenDeferral.GetFieldForData(ImmutableArray<byte> data, ushort alignment, SyntaxNode syntaxNode, DiagnosticBag diagnostics) 1030Cci.IFieldReference ITokenDeferral.GetArrayCachingFieldForData(ImmutableArray<byte> data, Cci.IArrayTypeReference arrayType, SyntaxNode syntaxNode, DiagnosticBag diagnostics) 1040public Cci.IFieldReference GetArrayCachingFieldForConstants(ImmutableArray<ConstantValue> constants, Cci.IArrayTypeReference arrayType, SyntaxNode syntaxNode, DiagnosticBag diagnostics) 1075internal PrivateImplementationDetails GetPrivateImplClass(TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics)
Emit\Context.cs (3)
16public readonly DiagnosticBag Diagnostics; 25public EmitContext(CommonPEModuleBuilder module, SyntaxNode? syntaxNode, DiagnosticBag diagnostics, bool metadataOnly, bool includePrivateMembers) 32DiagnosticBag diagnostics,
Emit\EditAndContinue\DefinitionMap.cs (2)
210internal VariableSlotAllocator? TryCreateVariableSlotAllocator(Compilation compilation, IMethodSymbolInternal method, IMethodSymbolInternal topLevelMethod, DiagnosticBag diagnostics) 420private void ReportMissingStateMachineAttribute(DiagnosticBag diagnostics, IMethodSymbolInternal method, string stateMachineAttributeFullName)
Emit\EditAndContinue\EncVariableSlotAllocator.cs (2)
199DiagnosticBag diagnostics, 232public override bool TryGetPreviousAwaiterSlotIndex(Cci.ITypeReference currentType, DiagnosticBag diagnostics, out int slotIndex)
Emit\EditAndContinue\IPEDeltaAssemblyBuilder.cs (1)
9void OnCreatedIndices(DiagnosticBag diagnostics);
Emit\EmitOptions.cs (1)
332internal void ValidateOptions(DiagnosticBag diagnostics, CommonMessageProvider messageProvider, bool isDeterministic)
Emit\NoPia\CommonEmbeddedEvent.cs (3)
65protected abstract Cci.ITypeReference GetType(TPEModuleBuilder moduleBuilder, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 78protected abstract void EmbedCorrespondingComEventInterfaceMethodInternal(TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics, bool isUsedForComAwareEventBinding); 80internal void EmbedCorrespondingComEventInterfaceMethod(TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics, bool isUsedForComAwareEventBinding)
Emit\NoPia\CommonEmbeddedMember.cs (4)
58protected virtual TAttributeData PortAttributeIfNeedTo(TAttributeData attrData, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 63private ImmutableArray<TAttributeData> GetAttributes(TPEModuleBuilder moduleBuilder, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 95var diagnostics = DiagnosticBag.GetInstance();
Emit\NoPia\CommonEmbeddedMethod.cs (1)
79protected sealed override TAttributeData PortAttributeIfNeedTo(TAttributeData attrData, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics)
Emit\NoPia\CommonEmbeddedParameter.cs (3)
80private ImmutableArray<TAttributeData> GetAttributes(TPEModuleBuilder moduleBuilder, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 197var diagnostics = DiagnosticBag.GetInstance();
Emit\NoPia\CommonEmbeddedType.cs (7)
69protected abstract Cci.ITypeReference GetBaseClass(TPEModuleBuilder moduleBuilder, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 81protected abstract TAttributeData CreateTypeIdentifierAttribute(bool hasGuid, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 82protected abstract void EmbedDefaultMembers(string defaultMember, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 84protected abstract void ReportMissingAttribute(AttributeDescription description, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 91private ImmutableArray<TAttributeData> GetAttributes(TPEModuleBuilder moduleBuilder, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 536var diagnostics = DiagnosticBag.GetInstance();
Emit\NoPia\EmbeddedTypesManager.cs (19)
22public abstract ImmutableArray<Cci.INamespaceTypeDefinition> GetTypes(DiagnosticBag diagnostics, HashSet<string> namesOfTopLevelTypes); 91public override ImmutableArray<Cci.INamespaceTypeDefinition> GetTypes(DiagnosticBag diagnostics, HashSet<string> namesOfTopLevelTypes) 137private bool HasNameConflict(HashSet<string> namesOfTopLevelTypes, TEmbeddedType type, DiagnosticBag diagnostics) 159internal abstract TAttributeData CreateSynthesizedAttribute(WellKnownMember constructor, ImmutableArray<TypedConstant> constructorArguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 160internal abstract bool TryGetAttributeArguments(TAttributeData attrData, out ImmutableArray<TypedConstant> constructorArguments, out ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 161internal abstract void ReportIndirectReferencesToLinkedAssemblies(TAssemblySymbol assembly, DiagnosticBag diagnostics); 163protected abstract void OnGetTypesCompleted(ImmutableArray<TEmbeddedType> types, DiagnosticBag diagnostics); 164protected abstract void ReportNameCollisionBetweenEmbeddedTypes(TEmbeddedType typeA, TEmbeddedType typeB, DiagnosticBag diagnostics); 165protected abstract void ReportNameCollisionWithAlreadyDeclaredType(TEmbeddedType type, DiagnosticBag diagnostics); 198protected void EmbedReferences(Cci.ITypeDefinitionMember embeddedMember, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 207protected abstract TEmbeddedType GetEmbeddedTypeForMember(TSymbol member, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 209internal abstract TEmbeddedField EmbedField(TEmbeddedType type, TFieldSymbol field, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 210internal abstract TEmbeddedMethod EmbedMethod(TEmbeddedType type, TMethodSymbol method, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 211internal abstract TEmbeddedProperty EmbedProperty(TEmbeddedType type, TPropertySymbol property, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 212internal abstract TEmbeddedEvent EmbedEvent(TEmbeddedType type, TEventSymbol @event, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics, bool isUsedForComAwareEventBinding); 214internal Cci.IFieldReference EmbedFieldIfNeedTo(TFieldSymbol fieldSymbol, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 224internal Cci.IMethodReference EmbedMethodIfNeedTo(TMethodSymbol methodSymbol, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 234internal void EmbedEventIfNeedTo(TEventSymbol eventSymbol, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics, bool isUsedForComAwareEventBinding) 243internal void EmbedPropertyIfNeedTo(TPropertySymbol propertySymbol, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics)
MetadataReader\MetadataHelpers.cs (1)
968internal static void CheckAssemblyOrModuleName(string name, CommonMessageProvider messageProvider, int code, DiagnosticBag diagnostics)
ReferenceManager\CommonReferenceManager.Binding.cs (3)
106[In, Out] DiagnosticBag resolutionDiagnostics, 223DiagnosticBag resolutionDiagnostics) 529DiagnosticBag resolutionDiagnostics,
ReferenceManager\CommonReferenceManager.Resolution.cs (8)
49protected abstract bool CheckPropertiesConsistency(MetadataReference primaryReference, MetadataReference duplicateReference, DiagnosticBag diagnostics); 218DiagnosticBag diagnostics) 475private Metadata? GetMetadata(PortableExecutableReference peReference, CommonMessageProvider messageProvider, Location location, DiagnosticBag diagnostics) 526private bool TryGetObservedMetadata(PortableExecutableReference peReference, DiagnosticBag diagnostics, out Metadata? metadata) 545internal AssemblyMetadata? GetAssemblyMetadata(PortableExecutableReference peReference, DiagnosticBag diagnostics) 610private void MergeReferenceProperties(MetadataReference primaryReference, MetadataReference newReference, DiagnosticBag diagnostics, ref Dictionary<MetadataReference, MergedAliases>? lazyAliasMap) 667DiagnosticBag diagnostics, 790DiagnosticBag diagnostics,
SourceGeneration\GeneratorContexts.cs (1)
20private readonly DiagnosticBag _diagnostics;
SourceGeneration\GeneratorDriver.cs (5)
68var diagnosticsBag = DiagnosticBag.GetInstance(); 213internal GeneratorDriverState RunGeneratorsCore(Compilation compilation, DiagnosticBag? diagnosticsBag, Func<GeneratorFilterContext, bool>? generatorFilter = null, CancellationToken cancellationToken = default) 381private static GeneratorState SetGeneratorException(Compilation compilation, CommonMessageProvider provider, GeneratorState generatorState, ISourceGenerator generator, Exception e, DiagnosticBag? diagnosticBag, CancellationToken cancellationToken, TimeSpan? runTime = null, bool isInit = false) 419private static ImmutableArray<Diagnostic> FilterDiagnostics(Compilation compilation, ImmutableArray<Diagnostic> generatorDiagnostics, DiagnosticBag? driverDiagnostics, CancellationToken cancellationToken)
SourceGeneration\IncrementalContexts.cs (4)
140internal readonly DiagnosticBag Diagnostics; 143internal SourceProductionContext(AdditionalSourcesCollection sources, DiagnosticBag diagnostics, Compilation compilation, CancellationToken cancellationToken) 247internal readonly DiagnosticBag Diagnostics; 263Diagnostics = DiagnosticBag.GetInstance();
SourceGeneration\Nodes\SourceOutputNode.cs (2)
65var diagnostics = DiagnosticBag.GetInstance();
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Statements.cs (1)
617var ignored = DiagnosticBag.GetInstance();
BoundTree\UnboundLambda.cs (1)
145var diagnostics = DiagnosticBag.GetInstance();
CodeGen\EmitStatement.cs (3)
1471var diag = DiagnosticBag.GetInstance(); 1588var diag = DiagnosticBag.GetInstance(); 1693var assertDiagnostics = DiagnosticBag.GetInstance();
CommandLine\CSharpCompiler.cs (1)
56var diagnosticBag = DiagnosticBag.GetInstance();
Compilation\CSharpCompilation.cs (3)
1905var diagnostics = DiagnosticBag.GetInstance(); 2898var diagnostics = DiagnosticBag.GetInstance(); 3332var result = DiagnosticBag.GetInstance();
Compilation\MemberSemanticModel.cs (1)
1993var diagnostics = DiagnosticBag.GetInstance();
Compilation\SyntaxAndDeclarationManager.cs (1)
215var diagnostics = DiagnosticBag.GetInstance();
Compiler\MethodCompiler.cs (1)
987var unusedDiagnostics = DiagnosticBag.GetInstance();
Declarations\DeclarationTreeBuilder.cs (6)
194var bag = DiagnosticBag.GetInstance(); 438var diagnostics = DiagnosticBag.GetInstance(); 524var diagnostics = DiagnosticBag.GetInstance(); 694var diagnostics = DiagnosticBag.GetInstance(); 806var diagnostics = DiagnosticBag.GetInstance(); 846var diagnostics = DiagnosticBag.GetInstance();
Emitter\EditAndContinue\EmitHelpers.cs (1)
34var diagnostics = DiagnosticBag.GetInstance();
Emitter\Model\AttributeDataAdapter.cs (1)
148var diagnostics = context.Diagnostics;
FlowAnalysis\FlowAnalysisPass.cs (1)
91var flowAnalysisDiagnostics = DiagnosticBag.GetInstance();
FlowAnalysis\RegionReachableWalker.cs (1)
21var diagnostics = DiagnosticBag.GetInstance();
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
272/// <see cref="Build(BoundNode, MethodSymbol, HashSet{MethodSymbol}, DiagnosticBag)"/>
Symbols\Compilation_WellKnownMembers.cs (1)
136var warnings = DiagnosticBag.GetInstance();
Symbols\ReferenceManager.cs (1)
345var resolutionDiagnostics = DiagnosticBag.GetInstance();
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (3)
266var diagnostics = DiagnosticBag.GetInstance(); 445var diagnostics = DiagnosticBag.GetInstance(); 455var diagnostics = DiagnosticBag.GetInstance();
Microsoft.CodeAnalysis.CSharp.Scripting (1)
CSharpScriptCompiler.cs (1)
41var diagnostics = DiagnosticBag.GetInstance();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\NullableConversionTests.cs (1)
811var bag = DiagnosticBag.GetInstance();
Semantics\OperatorTests.cs (2)
7333var diagnostics = DiagnosticBag.GetInstance(); 8816var diagnostics = DiagnosticBag.GetInstance();
Semantics\UnsafeTests.cs (1)
5205var unusedDiagnostics = DiagnosticBag.GetInstance();
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (2)
ExpressionCompiler.cs (2)
399var diagnostics = DiagnosticBag.GetInstance(); 422var otherDiagnostics = DiagnosticBag.GetInstance();
Microsoft.CodeAnalysis.Scripting (1)
ScriptBuilder.cs (1)
80var diagnostics = DiagnosticBag.GetInstance();
Microsoft.CodeAnalysis.Test.Utilities (1)
Platform\Desktop\DesktopRuntimeEnvironment.cs (1)
208var diagnostics = DiagnosticBag.GetInstance();