c++: Report invalid id-expression in decltype [PR100482]
This patch ensures that any errors raised by finish_id_expression when
parsing a decltype expression are properly reported, rather than
potentially going ignored and causing invalid code to be accepted.
We can also now remove the separate check for templates without args as
this is also checked for in finish_id_expression.
PR c++/100482
gcc/cp/ChangeLog:
* parser.cc (cp_parser_decltype_expr): Report errors raised by
finish_id_expression.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/decltype-100482.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>