Tl;DR;
clang is correct, the logic is that this is allowed by [dcl.spec.auto]
and to restrict this for deduced return types [dcl.spec.auto]p11 was added otherwise there is no restriction and therefore this is not restricted for the variables case.
See my more complete answer in the duplicate