[mono-api-html] Ignore more non breaking virtual changes when enabled
authorMarek Safar <marek.safar@gmail.com>
Tue, 26 Jul 2016 13:06:46 +0000 (15:06 +0200)
committerMarek Safar <marek.safar@gmail.com>
Tue, 26 Jul 2016 13:09:22 +0000 (15:09 +0200)
mcs/tools/mono-api-html/MemberComparer.cs

index 9da6edc106d5e91eedaef5e5c4c59e295d8ef8cc..e99f07415765bc21b618798f6d7c132a22d0a1e1 100644 (file)
@@ -424,8 +424,13 @@ namespace Xamarin.ApiDiff {
                                if (tgtAbstract) {
                                        change.AppendAdded ("abstract", true).Append (" ");
                                } else if (srcWord != tgtWord) {
-                                       if (!tgtFinal)
-                                               change.AppendModified (srcWord, tgtWord, breaking).Append (" ");
+                                       if (!tgtFinal) {
+                                               if (State.IgnoreVirtualChanges) {
+                                                       change.HasIgnoredChanges = true;
+                                               } else {
+                                                       change.AppendModified (srcWord, tgtWord, breaking).Append (" ");
+                                               }
+                                       }
                                } else if (tgtWord.Length > 0) {
                                        change.Append (tgtWord).Append (" ");
                                } else if (srcWord.Length > 0) {
@@ -437,7 +442,11 @@ namespace Xamarin.ApiDiff {
                                if (tgtFinal) {
                                        change.Append ("final ");
                                } else {
-                                       change.AppendRemoved ("final", false).Append (" "); // removing 'final' is not a breaking change.
+                                       if (srcVirtual && !tgtVirtual && State.IgnoreVirtualChanges) {
+                                               change.HasIgnoredChanges = true;
+                                       } else {
+                                               change.AppendRemoved ("final", false).Append (" "); // removing 'final' is not a breaking change.
+                                       }
                                }
                        } else {
                                if (tgtFinal && srcVirtual) {