Hello.
First at all. This is my first message in this mailing list.
I'm developing a static source analyzer from c++ frontend (in future
it will be a gcc plugin) and I get problems when I access to type of
typedef.
When I get a typedef, I would like to show the definition. I use:
tree v_next_type=DECL_ORIGINAL_TYPE(TYPE_NAME(v_type));
But this expression isn't always correct.
In the next source code when I get pp typedef (1) node the type
defined is my_pair<my_pair_2<<built-in>@int>::my_class>::my_class
I would like to get the node my_pair<Srv::ItemId>::my_public_class
P.S: I'm sorry if the style isn't correct for mailing list. I'm sure I
will improve the next time.
Thanks.
---------------------------------------------------------------------------------------------------------------------------------
using namespace std;
template <class T>
class my_pair {
private:
class my_class {
private:
int r_a; };
public:
typedef my_class my_public_class;
};
template <class T>
class my_pair_2 {
private:
class my_class {
private:
int r_a; };
public:
typedef my_class my_public_class;
};
class Srv {
private:
class SrvNested {
};
public:
typedef my_pair_2<int>::my_public_class ItemId;
};
typedef my_pair<Srv::ItemId>::my_public_class pp; <----------------- (1)
---------------------------------------------------------------------------------------------------------------------------------