mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 21:36:03 +08:00
pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for types.
* pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for types. From-SVN: r20498
This commit is contained in:
parent
5e7955289f
commit
581d38d0ba
@ -3164,6 +3164,11 @@ for_each_template_parm (t, fn, data)
|
||||
{
|
||||
if (!t)
|
||||
return 0;
|
||||
|
||||
if (TREE_CODE_CLASS (TREE_CODE (t)) == 't'
|
||||
&& for_each_template_parm (TYPE_CONTEXT (t), fn, data))
|
||||
return 1;
|
||||
|
||||
switch (TREE_CODE (t))
|
||||
{
|
||||
case INDIRECT_REF:
|
||||
|
16
gcc/testsuite/g++.old-deja/g++.pt/enum4.C
Normal file
16
gcc/testsuite/g++.old-deja/g++.pt/enum4.C
Normal file
@ -0,0 +1,16 @@
|
||||
// Build don't link:
|
||||
|
||||
template <class T>
|
||||
struct U
|
||||
{
|
||||
T mT;
|
||||
};
|
||||
|
||||
template <class H>
|
||||
struct M
|
||||
{
|
||||
enum FLAG {On, Off};
|
||||
U<FLAG> mUF;
|
||||
};
|
||||
|
||||
M<char> gm;
|
Loading…
Reference in New Issue
Block a user