diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-12-11 08:22:57 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-12-11 08:28:19 -0800 |
commit | 059da609fa8b3a08d1d6618f9d90dc3cfbcd05bc (patch) | |
tree | 8ef1891954a5d66472c298c94ec1d481511dc6ca /gcc/cp/cp-tree.h | |
parent | 75de6a2895f503905589934e30c68b9a5ec41f2f (diff) | |
download | gcc-059da609fa8b3a08d1d6618f9d90dc3cfbcd05bc.zip gcc-059da609fa8b3a08d1d6618f9d90dc3cfbcd05bc.tar.gz gcc-059da609fa8b3a08d1d6618f9d90dc3cfbcd05bc.tar.bz2 |
c++: cp_tree_equal tweaks
When comparing streamed trees we can encounter NON_LVALUE_EXPR and
VIEW_CONVERT_EXPRs with null types. Also, when checking a potential
duplicate we don't want to reject PARM_DECLs with different contexts,
if those two contexts are the two decls of interest.
gcc/cp/
* cp-tree.h (map_context_from, map_context_to): Declare.
* module.cc (map_context_from, map_context_to): Define.
* tree.c (cp_tree_equal): Check map_context_{from,to} for parm
context difference. Allow NON_LVALUE_EXPR and VIEW_CONVERT_EXPR
with null types.
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 63170fc..f2a01d2 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -5454,6 +5454,10 @@ extern int function_depth; in structrual_comptypes. */ extern int comparing_specializations; +/* When comparing specializations permit context _FROM to match _TO. */ +extern tree map_context_from; +extern tree map_context_to; + /* In parser.c. */ /* Nonzero if we are parsing an unevaluated operand: an operand to |