aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-11-27 17:05:41 -0500
committerJason Merrill <jason@gcc.gnu.org>2019-11-27 17:05:41 -0500
commit96cbfa7ff8a146febd6af9a53d10468a90706419 (patch)
treef585e46432a0cccd16721f316ffa8727271560fa /gcc/cp/cp-tree.h
parenta92cc0da1c4c85b5ac8bb3eb013946ee9ad3a40f (diff)
downloadgcc-96cbfa7ff8a146febd6af9a53d10468a90706419.zip
gcc-96cbfa7ff8a146febd6af9a53d10468a90706419.tar.gz
gcc-96cbfa7ff8a146febd6af9a53d10468a90706419.tar.bz2
PR c++/92206 - ICE with typedef to dependent alias.
rsandifo's patch for 92206 demonstrated a problem with the existing checking for alias template specializations: they were returning false for a typedef to an alias template specialization. Which is sometimes what the caller wants, and sometimes not: Sometimes we're interested in whether the type was written as an alias template-id, and sometimes whether it represents one. The testcase illustrates a case that remained wrong with the earlier patch: if the typedef is itself an alias template specialization, we can't strip an underlying dependent alias. * pt.c (dependent_alias_template_spec_p) (alias_template_specialization_p): Add transparent_typedefs parameter. (iterative_hash_template_arg, any_template_parm_r) (primary_template_specialization_p, tsubst, dependent_type_p_r): Adjust. * decl.c (check_elaborated_type_specifier): Adjust. * error.c (dump_template_bindings, dump_aggr_type): Adjust. From-SVN: r278784
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 4b4bc24..d8e12e9 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -6938,8 +6938,9 @@ extern tree instantiate_non_dependent_expr_internal (tree, tsubst_flags_t);
extern tree instantiate_non_dependent_or_null (tree);
extern bool variable_template_specialization_p (tree);
extern bool alias_type_or_template_p (tree);
-extern bool alias_template_specialization_p (const_tree);
-extern bool dependent_alias_template_spec_p (const_tree);
+enum { nt_opaque = false, nt_transparent = true };
+extern tree alias_template_specialization_p (const_tree, bool);
+extern tree dependent_alias_template_spec_p (const_tree, bool);
extern bool template_parm_object_p (const_tree);
extern bool explicit_class_specialization_p (tree);
extern bool push_tinst_level (tree);