- Bug fix. Deduplicate messages based on all parameter values, not just the first one.

- Allow messages to be suppressed based on any number of parameter values.
- Write fully specific -nowarn options to suppress file.
This commit is contained in:
jfrijters 2013-01-07 10:54:55 +00:00
Родитель 0c3bed02d9
Коммит f0c3cca38a
1 изменённых файлов: 11 добавлений и 10 удалений

Просмотреть файл

@ -3577,17 +3577,18 @@ namespace IKVM.Internal
internal static void IssueMessage(CompilerOptions options, Message msgId, params string[] values)
{
StringBuilder sb = new StringBuilder();
sb.Append((int)msgId);
if(values.Length > 0)
string key = ((int)msgId).ToString();
for (int i = 0; ; i++)
{
sb.Append(':').Append(values[0]);
}
string key = sb.ToString();
if(options.suppressWarnings.ContainsKey(key)
|| options.suppressWarnings.ContainsKey(((int)msgId).ToString()))
{
return;
if (options.suppressWarnings.ContainsKey(key))
{
return;
}
if (i == values.Length)
{
break;
}
key += ":" + values[i];
}
options.suppressWarnings.Add(key, key);
if(options.writeSuppressWarningsFile != null)