Fix location of typeid() (PR c++/80014)
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 30 Jun 2017 15:20:55 +0000 (15:20 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 30 Jun 2017 15:20:55 +0000 (15:20 +0000)
commite59e8b5a1c86c6e901201e1d0fdcf53e2c453637
tree6c3e05190bdb092ce15fa48cc6a65a8f933716e5
parente855bdc04db3b2ff010d6d490dc9a4bee5f08b3b
Fix location of typeid() (PR c++/80014)

gcc/cp/ChangeLog:
PR c++/80014
* parser.c (cp_parser_postfix_expression): Construct a location
for typeid expressions.

gcc/testsuite/ChangeLog:
PR c++/80014
* g++.dg/plugin/diagnostic-test-expressions-1.C (std::type_info):
Add declaration.
(test_typeid): New test function.

From-SVN: r249845
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/plugin/diagnostic-test-expressions-1.C