C++: fix-it hint for missing "typename" (PR c++/63392)
commit218a51b98bf03cef934b0912bac4acc067294447
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Aug 2018 23:33:02 +0000 (27 23:33 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Aug 2018 23:33:02 +0000 (27 23:33 +0000)
tree3c85ac088c15309e8f7b0a515cc378c4e9c35970
parent407db075fb6238991a639c8e6be122a655f8a919
C++: fix-it hint for missing "typename" (PR c++/63392)

This patch adds a fix-it hint to missing "typename" errors in the C++
frontend, suggesting the insertion of "typename ".

This addresses part of PR c++/63392; however it does not improve the
error-recovery for such cases.

gcc/cp/ChangeLog:
PR c++/63392
* parser.c (cp_parser_diagnose_invalid_type_name): Add fix-it
hint.

gcc/testsuite/ChangeLog:
PR c++/63392
* g++.dg/diagnostic/missing-typename.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263899 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/diagnostic/missing-typename.C [new file with mode: 0644]