From 99902c5580b4566b2a3b3616a855ac8bb713a980 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Fri, 8 Apr 2016 10:53:48 +0300 Subject: [PATCH] Disabled a type of false errors when auto-compiling on OS X. Signed-off-by: Dimitar Dobrev --- src/Generator/Driver.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Generator/Driver.cs b/src/Generator/Driver.cs index 380dd58b..5db6b8ed 100644 --- a/src/Generator/Driver.cs +++ b/src/Generator/Driver.cs @@ -417,7 +417,9 @@ namespace CppSharp compilerParameters, compileUnits.ToArray()); } - var errors = compilerResults.Errors.Cast().Where(e => !e.IsWarning).ToList(); + var errors = compilerResults.Errors.Cast().Where(e => !e.IsWarning && + // HACK: auto-compiling on OS X produces "errors" which do not affect compilation so we ignore them + (!Platform.IsMacOS || !e.ErrorText.EndsWith("(Location of the symbol related to previous warning)", StringComparison.Ordinal))).ToList(); foreach (var error in errors) Diagnostics.Error(error.ToString());