protected void WarnIfProtectedMemberInSealedClass(TypeMember member) { if (member.IsProtected && !member.IsSynthetic && !member.IsOverride && member.DeclaringType.IsFinal) { Warnings.Add(CompilerWarningFactory.NewProtectedMemberInSealedType(member)); } }