aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/constraint.cc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2023-04-20 15:00:04 -0400
committerPatrick Palka <ppalka@redhat.com>2023-04-20 15:00:04 -0400
commitd180a5524ccdab8ef839ee55efecf60ce5b0240b (patch)
treeb6b293a224d39606c5665af2a66e8974a353f333 /gcc/cp/constraint.cc
parentd4e8523bf3bfb5f7c23822c23bd2b230030c3d2a (diff)
downloadgcc-d180a5524ccdab8ef839ee55efecf60ce5b0240b.zip
gcc-d180a5524ccdab8ef839ee55efecf60ce5b0240b.tar.gz
gcc-d180a5524ccdab8ef839ee55efecf60ce5b0240b.tar.bz2
c++: make strip_typedefs generalize strip_typedefs_expr
Currently if we have a TREE_VEC of types that we want to strip of typedefs, we unintuitively need to call strip_typedefs_expr instead of strip_typedefs since only strip_typedefs_expr handles TREE_VEC, and it also dispatches to strip_typedefs when given a type. But this seems backwards: arguably strip_typedefs_expr should be the more specialized function, which strip_typedefs dispatches to (and thus generalizes). So this patch makes strip_typedefs subsume strip_typedefs_expr rather than vice versa, which allows for some simplifications. gcc/cp/ChangeLog: * tree.cc (strip_typedefs): Move TREE_LIST handling to strip_typedefs_expr. Dispatch to strip_typedefs_expr for non-type 't'. <case TYPENAME_TYPE>: Remove manual dispatching to strip_typedefs_expr. <case TRAIT_TYPE>: Likewise. (strip_typedefs_expr): Replaces calls to strip_typedefs_expr with strip_typedefs throughout. Don't dispatch to strip_typedefs for type 't'. <case TREE_LIST>: Replace this with the better version from strip_typedefs.
Diffstat (limited to 'gcc/cp/constraint.cc')
0 files changed, 0 insertions, 0 deletions