So darklone, it is not whether the spell could cause damage, or has a saving throw, but that is does cause damage or forces a saving throw that makes it an attack.
If i fireball an empty area do i become visible. If i do i fail to see how that is different to a wall of fire, which has a damage component.
Wall of ice and wall of thorns also have damage components. Wall of thorns also has the ability to hamper subjects, one of the definitions of an attack spell.
I do not think that you need to damage, hamper, harm or cause an opponent to make a save to class the spell as an attack; just that if the spell has the ability to do one of these makes it an attack spell. Invisibility is not a divination spell, it does not know when an invisible opponent is subject to other spells you cast so that u become visible, nor does it make u visible later when someone needs to make a saving throw.
But if we follow my logic invisibility is broken by Cure Light Wounds as it can cause damage, and it gives a saving throw. Not sure if that is what the designers wished for.