c++: tidy auto deduction
commit8189838d823ea65e560c573d38a65edc12f5c2e3
authorJason Merrill <jason@redhat.com>
Fri, 29 Apr 2022 18:21:47 +0000 (29 14:21 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 29 Apr 2022 19:12:07 +0000 (29 15:12 -0400)
tree6b512751386433e09e6cf7d57afdfbde87af21a5
parentfd0d3e9121c5aa65150d242676be6bbdc8d4a92a
c++: tidy auto deduction

In r185768 I added the !FUNCTION_DECL check, but we might as well just check
for variable; nothing else should take this path, and asserting as much
doesn't regress anything.

gcc/cp/ChangeLog:

* decl.cc (cp_finish_decl): Only consider auto for vars.
gcc/cp/decl.cc