From 58263e686cf1a8c5182d4a2fa66235cfd1dabbd4 Mon Sep 17 00:00:00 2001 From: Manish Vasani Date: Thu, 19 Feb 2015 15:08:21 -0800 Subject: [PATCH] Minor fix --- src/Compilers/Core/Desktop/CommandLine/CommonCompiler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Compilers/Core/Desktop/CommandLine/CommonCompiler.cs b/src/Compilers/Core/Desktop/CommandLine/CommonCompiler.cs index e19cc6378a4..ae6b5bf0c3d 100644 --- a/src/Compilers/Core/Desktop/CommandLine/CommonCompiler.cs +++ b/src/Compilers/Core/Desktop/CommandLine/CommonCompiler.cs @@ -337,6 +337,7 @@ private int RunCore(TextWriter consoleOutput, CancellationToken cancellationToke EventHandler analyzerExceptionDiagnosticsHandler = null; if (!analyzers.IsDefaultOrEmpty) { + analyzerExceptionDiagnostics = new ConcurrentSet(); analyzerExceptionDiagnosticsHandler = AnalyzerDriverHelper.RegisterAnalyzerExceptionDiagnosticHandler(analyzers, analyzerExceptionDiagnostics.Add); var analyzerManager = new AnalyzerManager(); @@ -448,8 +449,8 @@ private int RunCore(TextWriter consoleOutput, CancellationToken cancellationToke if (analyzerDriver != null) { var analyzerDiagnostics = analyzerDriver.GetDiagnosticsAsync().Result; - AnalyzerDriverHelper.UnregisterAnalyzerExceptionDiagnosticHandler(analyzerExceptionDiagnosticsHandler); var allAnalyzerDiagnostics = analyzerDiagnostics.AddRange(analyzerExceptionDiagnostics); + AnalyzerDriverHelper.UnregisterAnalyzerExceptionDiagnosticHandler(analyzerExceptionDiagnosticsHandler); if (PrintErrors(allAnalyzerDiagnostics, consoleOutput)) { -- GitLab