Star–planet systems as possible progenitors of cataclysmic binaries