What is your desired result?
In reply to VKhlyupin:
The desired result should be that of an ideal comparator.
In reply to ksnf3000:
Not sure your last response is terribly helpful (nor was the question from VKhlyupin to be honest).
Anyway, you can only use ac analysis on a Linear Time Invariant system - but what you have here is a Linear Time Variant (or Linear Time Varying) system. Put another way, the ac analysis does a small signal analysis around a single dc point - but in this case your operating point is actually a period of the clock. So similarly dc doesn't make a whole lot of sense either.
What you need to do is to use pss and pac to analysis your system. This allows you to look at the time-averaged AC response of the circuit over a period of operation. Whilst these analyses are commonly used in RF design, they are also suitable for other kinds of switching circuits such as switched capacitor filters, chopper-stabilized amplifiers, and switched comparators. See this paper for details on using it with switched capacitor design, for example.
In reply to Andrew Beckett:
Thanks for your prompt response. The pdf is really helpful as I am working on switched capacitors which uses a clocked comparator.