diff options
author | Marek Polacek <polacek@redhat.com> | 2020-11-10 16:39:19 -0500 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2020-11-11 12:36:52 -0500 |
commit | d6e5745a9a88314e27f387b2277299076862af67 (patch) | |
tree | 71ce4bec306b8303730e6a6c4257c3109ed045b2 /libcc1 | |
parent | 2e8b368c3d33fd8ddafdd37f8e1b2ba45d1a122e (diff) | |
download | gcc-d6e5745a9a88314e27f387b2277299076862af67.tar.gz |
c++: Tweak tsubst_qualified_id location.
Retain the location when tsubstituting a qualified-id so that our
static_assert diagnostic can benefit. Don't create useless location
wrappers for temporary variables.
gcc/ChangeLog:
PR c++/97518
* tree.c (maybe_wrap_with_location): Don't add a location
wrapper around an artificial and ignored decl.
gcc/cp/ChangeLog:
PR c++/97518
* pt.c (tsubst_qualified_id): Use EXPR_LOCATION of the qualified-id.
Use it to maybe_wrap_with_location the final expression.
gcc/testsuite/ChangeLog:
PR c++/97518
* g++.dg/diagnostic/static_assert3.C: New test.
Diffstat (limited to 'libcc1')
0 files changed, 0 insertions, 0 deletions