Damage may occur:
Texas Instruments:
http://www.ti.com/lit/ds/symlink/lm340-n.pdf (covers 78xx series regulators also)
SHORTING THE REGULATOR INPUT
When using large capacitors at the output of these regulators, a protection diode connected input to output
(Figure 9) may be required if the input is shorted to ground. Without the protection diode, an input short will
cause the input to rapidly approach ground potential, while the output remains near the initial VOUTbecause of the
stored charge in the large output capacitor. The capacitor will then discharge through a large internal input to
output diode and parasitic transistors. If the energy released by the capacitor is large enough, this diode, low
current metal and the regulator will be destroyed. The fast diode in Figure 9 will shunt most of the capacitors
discharge current around the regulator. Generally no protection diode is required for values of output capacitance
≤ 10 μF.
RAISING THE OUTPUT VOLTAGE ABOVE THE INPUT VOLTAGE
Since the output of the device does not sink current, forcing the output high can cause damage to internal low
current paths in a manner similar to that just described in the “Shorting the Regulator Input” section.
Solution shown is 1N4002 from output (Anode) to input (cathode)
Fairchild
http://www.fairchildsemi.com/ds/LM/LM7805.pdfNothing mentioned
Read the datasheet for other sources to be sure.
Diode from out to in will certainly not hurt.