diff options
author | David Malcolm <dmalcolm@redhat.com> | 2017-04-24 19:12:52 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2017-04-24 19:12:52 +0000 |
commit | 412f61f0f6ee495f3dd076debd9db536aa386a26 (patch) | |
tree | c526d0dafa94cbbde49da875a81aa5371bb35d73 /gcc/tree-vect-loop.c | |
parent | a8492d5ec1d8b90930a7dca04a104bcaec62d035 (diff) | |
download | gcc-412f61f0f6ee495f3dd076debd9db536aa386a26.zip gcc-412f61f0f6ee495f3dd076debd9db536aa386a26.tar.gz gcc-412f61f0f6ee495f3dd076debd9db536aa386a26.tar.bz2 |
Fix location of sizeof/alignof (PR c++/80016)
PR c++/80016 reports an issue with bizarre underlined range
for a complicated expression.
The root cause for the incorrect *starting* location of that range
is that alignof and sizeof expressions currently have
start == finish == caret at the opening parenthesis of the
expression.
This patch fixes this by generating appropriate start and finish
locations for alignof and sizeof expressions.
gcc/cp/ChangeLog:
PR c++/80016
* parser.c (cp_parser_unary_expression): Generate a location
range for alignof and sizeof expressions.
gcc/testsuite/ChangeLog:
PR c++/80016
* g++.dg/plugin/diagnostic-test-expressions-1.C (test_sizeof): New
test function.
(test_alignof): New test function.
From-SVN: r247108
Diffstat (limited to 'gcc/tree-vect-loop.c')
0 files changed, 0 insertions, 0 deletions