We also need to constrain the kinds of decls that we test
DECL_TEMPLATE_INFO on according to template_info_decl_check.
-- >8 --
Subject: [PATCH] c++: improve debug_tree for templated types/decls
gcc/cp/ChangeLog:
* ptree.cc (cxx_print_decl): Check for DECL_LANG_SPECIFIC and
> > @@ -124,27 +124,29 @@ cxx_print_decl (FILE *file, tree node, int indent)
> > need_indent = false;
> > }
> > - if (VAR_OR_FUNCTION_DECL_P (node)
> > + if (DECL_LANG_SPECIFIC (node)
>
> Hmm, won't this crash on a non-COMMON decl?
Oops
On 7/31/23 20:34, Patrick Palka wrote:
Tested on x86_64-pc-linux-gnu, does this look OK for trunk?
-- >8 --
gcc/cp/ChangeLog:
* ptree.cc (cxx_print_decl): Check for DECL_LANG_SPECIFIC and
TS_DECL_COMMON only when necessary. Print DECL_TEMPLATE_INFO
for all decls that
Tested on x86_64-pc-linux-gnu, does this look OK for trunk?
-- >8 --
gcc/cp/ChangeLog:
* ptree.cc (cxx_print_decl): Check for DECL_LANG_SPECIFIC and
TS_DECL_COMMON only when necessary. Print DECL_TEMPLATE_INFO
for all decls that have it, not just VAR_DECL or