testing/protocmp: document behavior when combining Ignore and Sort

fixes golang/protobuf#1652

Change-Id: I19af3714ec9fd9e54446bb0c3bd6815d90f11e10
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/622575
Reviewed-by: Christian Höppner <hoeppi@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Stapelberg <stapelberg@google.com>
diff --git a/testing/protocmp/util.go b/testing/protocmp/util.go
index 838e70f..2282811 100644
--- a/testing/protocmp/util.go
+++ b/testing/protocmp/util.go
@@ -524,6 +524,9 @@
 // handled by this option. To sort Go slices that are not repeated fields,
 // consider using [github.com/google/go-cmp/cmp/cmpopts.SortSlices] instead.
 //
+// The sorting of messages does not take into account ignored fields or oneofs
+// as a result of [IgnoreFields] or [IgnoreOneofs].
+//
 // This must be used in conjunction with [Transform].
 func SortRepeated(lessFunc any) cmp.Option {
 	t, ok := checkTTBFunc(lessFunc)
@@ -624,6 +627,9 @@
 //	    ... // user-provided definition for less
 //	}))
 //
+// The sorting of messages does not take into account ignored fields or oneofs
+// as a result of [IgnoreFields] or [IgnoreOneofs].
+//
 // This must be used in conjunction with [Transform].
 func SortRepeatedFields(message proto.Message, names ...protoreflect.Name) cmp.Option {
 	var opts cmp.Options