aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2017-05-02 21:46:40 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2017-05-02 21:46:40 +0000
commitc3b73151139abea8b5ee98e3f057138f53924c08 (patch)
treed2f38c3043b8b7da1ac4d604052a3f3fe649f436 /gcc
parent459d2f5a49c5b9e5c1166dcb91c83f91223fded1 (diff)
downloadgcc-c3b73151139abea8b5ee98e3f057138f53924c08.zip
gcc-c3b73151139abea8b5ee98e3f057138f53924c08.tar.gz
gcc-c3b73151139abea8b5ee98e3f057138f53924c08.tar.bz2
pt.c (is_auto_or_concept): Remove.
2017-05-02 Paolo Carlini <paolo.carlini@oracle.com> * pt.c (is_auto_or_concept): Remove. (type_uses_auto_or_concept): Remove, unused. (find_parameter_packs_r, extract_autos_r, is_auto_r): Adjust. * parser.c (tree_type_is_auto_or_concept): Remove, unused. * cp-tree.h (is_auto_or_concept): Remove. From-SVN: r247526
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/cp-tree.h1
-rw-r--r--gcc/cp/parser.c10
-rw-r--r--gcc/cp/pt.c26
4 files changed, 11 insertions, 34 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 183f736..b12f87e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2017-05-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * pt.c (is_auto_or_concept): Remove.
+ (type_uses_auto_or_concept): Remove, unused.
+ (find_parameter_packs_r, extract_autos_r, is_auto_r): Adjust.
+ * parser.c (tree_type_is_auto_or_concept): Remove, unused.
+ * cp-tree.h (is_auto_or_concept): Remove.
+
2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
PR c++/80038
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 3bbc0bf..675b156 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -6161,7 +6161,6 @@ extern void append_type_to_template_for_access_check (tree, tree, tree,
extern tree convert_generic_types_to_packs (tree, int, int);
extern tree splice_late_return_type (tree, tree);
extern bool is_auto (const_tree);
-extern bool is_auto_or_concept (const_tree);
extern tree process_template_parm (tree, location_t, tree,
bool, bool);
extern tree end_template_parm_list (tree);
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 95af052..7197c19 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -38795,16 +38795,6 @@ make_generic_type_name ()
return get_identifier (buf);
}
-/* Predicate that behaves as is_auto_or_concept but matches the parent
- node of the generic type rather than the generic type itself. This
- allows for type transformation in add_implicit_template_parms. */
-
-static inline bool
-tree_type_is_auto_or_concept (const_tree t)
-{
- return TREE_TYPE (t) && is_auto_or_concept (TREE_TYPE (t));
-}
-
/* Add an implicit template type parameter to the CURRENT_TEMPLATE_PARMS
(creating a new template parameter list if necessary). Returns the newly
created template type parm. */
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index cf6ba6d..1567e2b 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -3489,7 +3489,7 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
parameter pack (14.6.3), or the type-specifier-seq of a type-id that
is a pack expansion, the invented template parameter is a template
parameter pack. */
- if (ppd->type_pack_expansion_p && is_auto_or_concept (t))
+ if (ppd->type_pack_expansion_p && is_auto (t))
TEMPLATE_TYPE_PARAMETER_PACK (t) = true;
if (TEMPLATE_TYPE_PARAMETER_PACK (t))
parameter_pack_p = true;
@@ -24806,7 +24806,7 @@ static int
extract_autos_r (tree t, void *data)
{
hash_table<auto_hash> &hash = *(hash_table<auto_hash>*)data;
- if (is_auto_or_concept (t))
+ if (is_auto (t))
{
/* All the autos were built with index 0; fix that up now. */
tree *p = hash.find_slot (t, INSERT);
@@ -25530,7 +25530,7 @@ is_auto (const_tree type)
int
is_auto_r (tree tp, void */*data*/)
{
- return is_auto_or_concept (tp);
+ return is_auto (tp);
}
/* Returns the TEMPLATE_TYPE_PARM in TYPE representing `auto' iff TYPE contains
@@ -25556,26 +25556,6 @@ type_uses_auto (tree type)
return find_type_usage (type, is_auto);
}
-/* Returns true iff TYPE is a TEMPLATE_TYPE_PARM representing 'auto',
- 'decltype(auto)' or a concept. */
-
-bool
-is_auto_or_concept (const_tree type)
-{
- return is_auto (type); // or concept
-}
-
-/* Returns the TEMPLATE_TYPE_PARM in TYPE representing a generic type (`auto' or
- a concept identifier) iff TYPE contains a use of a generic type. Returns
- NULL_TREE otherwise. */
-
-tree
-type_uses_auto_or_concept (tree type)
-{
- return find_type_usage (type, is_auto_or_concept);
-}
-
-
/* For a given template T, return the vector of typedefs referenced
in T for which access check is needed at T instantiation time.
T is either a FUNCTION_DECL or a RECORD_TYPE.