29 references to ToReadOnlyAndFree
Microsoft.CodeAnalysis (8)
CommandLine\AnalyzerConfigSet.cs (1)
468diagnostics = diagnosticBag.ToReadOnlyAndFree();
CommandLine\CommonCompiler.cs (2)
751ReportDiagnostics(diagnostics.ToReadOnlyAndFree(), consoleOutput, errorLoggerOpt: logger, compilation: null); 1648errors = diagnostics.ToReadOnlyAndFree().SelectAsArray(diag => new DiagnosticInfo(messageProvider, diag.IsWarningAsError, diag.Code, (object[])diag.Arguments));
Compilation\Compilation.cs (1)
3029return new EmitResult(success, diagnostics.ToReadOnlyAndFree());
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
886return allDiagnostics.ToReadOnlyAndFree();
SourceGeneration\GeneratorContexts.cs (1)
112=> (_additionalSources.ToImmutableAndFree(), _diagnostics.ToReadOnlyAndFree());
SourceGeneration\GeneratorDriver.cs (1)
72diagnostics = diagnosticsBag.ToReadOnlyAndFree();
SourceGeneration\IncrementalContexts.cs (1)
280=> (Sources.ToImmutableAndFree(), Diagnostics.ToReadOnlyAndFree(), GeneratorRunStateBuilder.ToImmutableAndFree(), HostOutputBuilder.ToImmutable());
Microsoft.CodeAnalysis.CSharp (19)
CommandLine\CSharpCommandLineParser.cs (2)
1760diagnostics = outputDiagnostics.ToReadOnlyAndFree(); 1795diagnostics = outputDiagnostics.ToReadOnlyAndFree();
CommandLine\CSharpCompiler.cs (2)
92if (ReportDiagnostics(diagnosticBag.ToReadOnlyAndFree(), consoleOutput, errorLogger, compilation: null)) 407ReportDiagnostics(newDiagnostics.ToReadOnlyAndFree(), consoleOutput, errorLogger, compilation);
Compilation\CSharpCompilation.cs (2)
1909entryPoint.Diagnostics.Diagnostics.Concat(diagnostics.ToReadOnlyAndFree()), entryPoint.Diagnostics.Dependencies)); 2944return diagnostics.ToReadOnlyAndFree();
Compilation\SyntaxAndDeclarationManager.cs (1)
282loadDirectives.Add(new LoadDirective(resolvedFilePath, diagnostics.ToReadOnlyAndFree()));
Declarations\DeclarationTreeBuilder.cs (6)
197diagnostics = bag.ToReadOnlyAndFree(); 472diagnostics: diagnostics.ToReadOnlyAndFree(), 622diagnostics: diagnostics.ToReadOnlyAndFree()); 786diagnostics: diagnostics.ToReadOnlyAndFree(), 834diagnostics: diagnostics.ToReadOnlyAndFree(), 872diagnostics: diagnostics.ToReadOnlyAndFree(),
Emitter\EditAndContinue\EmitHelpers.cs (3)
47diagnostics: diagnostics.ToReadOnlyAndFree(), 111diagnostics: diagnostics.ToReadOnlyAndFree(), 149diagnostics: diagnostics.ToReadOnlyAndFree(),
Symbols\Source\SourceAssemblySymbol.cs (1)
2774ImmutableInterlocked.InterlockedInitialize(ref _unusedFieldWarnings, diagnostics.ToReadOnlyAndFree());
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (2)
382Diagnostics = diagnostics.ToReadOnlyAndFree() 458new ExternAliasesAndDiagnostics() { ExternAliases = buildExternAliases(externAliasDirectives, declaringSymbol, diagnostics), Diagnostics = diagnostics.ToReadOnlyAndFree() },
Microsoft.CodeAnalysis.Test.Utilities (2)
CompilationVerifier.cs (2)
613diagnostics.ToReadOnlyAndFree(), 620throw new EmitException(diagnostics.ToReadOnlyAndFree(), dumpDir);