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