diff options
author | Jason Merrill <jason@redhat.com> | 2023-05-01 21:03:45 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2023-05-02 16:24:20 -0400 |
commit | a43f3616c0069541b1f465eea67285eeeff36785 (patch) | |
tree | 0163b56e55840e3f3ebd74706dcbfc653c024f30 /gcc/cp/cp-tree.h | |
parent | 4b8d0d4d7fd245ef85c7801e7838845502a5a61d (diff) | |
download | gcc-a43f3616c0069541b1f465eea67285eeeff36785.zip gcc-a43f3616c0069541b1f465eea67285eeeff36785.tar.gz gcc-a43f3616c0069541b1f465eea67285eeeff36785.tar.bz2 |
c++: look for empty base at specific offset [PR109678]
While looking at the empty base handling for 109678, it occurred to me that
we ought to be able to look for an empty base at a specific offset, not just
in general.
PR c++/109678
gcc/cp/ChangeLog:
* cp-tree.h (lookup_base): Add offset parm.
* constexpr.cc (cxx_fold_indirect_ref_1): Pass it.
* search.cc (struct lookup_base_data_s): Add offset.
(dfs_lookup_base): Handle it.
(lookup_base): Pass it.
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index c9c4cd6..406a550 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -7515,7 +7515,8 @@ extern tree build_if_nonnull (tree, tree, tsubst_flags_t); extern tree get_parent_with_private_access (tree decl, tree binfo); extern bool accessible_base_p (tree, tree, bool); extern tree lookup_base (tree, tree, base_access, - base_kind *, tsubst_flags_t); + base_kind *, tsubst_flags_t, + HOST_WIDE_INT = -1); extern tree dcast_base_hint (tree, tree); extern int accessible_p (tree, tree, bool); extern int accessible_in_template_p (tree, tree); |