]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Handle TU_LOCAL_ENTITY in tsubst_expr and potential_constant_expression
authorNathaniel Shead <nathanieloshead@gmail.com>
Tue, 11 Feb 2025 11:59:36 +0000 (22:59 +1100)
committerNathaniel Shead <nathanieloshead@gmail.com>
Fri, 7 Mar 2025 10:13:29 +0000 (21:13 +1100)
commit95e23e74ccb1fe7decf916c12e74486b692372cd
tree25e165e9632705a5f90c3065fceaafe24e64ae2d
parente1c49f413c8c892a61612b3b89de0607ff7ba893
c++: Handle TU_LOCAL_ENTITY in tsubst_expr and potential_constant_expression

This cleans up the TU_LOCAL_ENTITY handling to avoid unnecessary
tree walks and make the logic more robust.

gcc/cp/ChangeLog:

* constexpr.cc (potential_constant_expression_1): Handle
TU_LOCAL_ENTITY.
* pt.cc (expr_contains_tu_local_entity): Remove.
(function_contains_tu_local_entity): Remove.
(dependent_operand_p): Remove special handling for
TU_LOCAL_ENTITY.
(tsubst_expr): Handle TU_LOCAL_ENTITY when tsubsting OVERLOADs;
remove now-unnecessary extra handling.
(type_dependent_expression_p): Handle TU_LOCAL_ENTITY.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Patrick Palka <ppalka@redhat.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
gcc/cp/constexpr.cc
gcc/cp/pt.cc