The description for spiritual weapon states that (emphasis mine)
You create a floating, spectral weapon within range that lasts for the duration or until you cast this spell again. When you cast the spell, you can make a melee spell attack against a creature within 5 feet of the weapon. On a hit, the target takes force damage equal to 1d8 + your spellcasting ability modifier.
As a bonus action on your turn, you can move the weapon up to 20 feet and repeat the attack against a creature within 5 feet of it.
If there is an illusion of a creature in the path of where you want to move the weapon what happens?
- The weapon cannot pass through the illusion so would have to move around it
- The weapon in spectral form passes through the creature whether or not it is an illusion but does not reveal it
- The weapon passes through the creature because it is an illusion which then reveals it as an illusion
- Something else?