[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-dev
Subject: Re: [cfe-dev] clang and gcc implement __PRETTY_FUNCTION__ differently
From: Nikola Smiljanic <popizdeh () gmail ! com>
Date: 2012-03-19 16:21:26
Message-ID: CAGq7tnNZPe_ygmeP=G-deNCu7_n4ReNYMWW1_+Vqy2OFCvp1LA () mail ! gmail ! com
[Download RAW message or body]
> As John noted, if you want to get back to the original source, you'll need to make \
> this a loop. Plus, you'll probably > want to check if it was an explicit \
> specialization and stop iterating at that point, since explicit specializations \
> were > written by the user (rather than instantiated).
After some poking around I realized that I've seen code like this
somewhere. This is exactly what getTemplateInstantiationPattern does,
it even handles the explicit specialization case that I wasn't aware
of. But I still can't think of the test case where repeated calls to
getInstantiatedFromMemberTemplate are needed, please help.
> There are a few cases here, too. For example, you could have a CXXRecordDecl that's \
> an instantiation of a member class, e.g.,
> template<typename T>
> struct X {
> struct Inner {
> void f();
> };
> };
>
> and you don't want to skip "Inner" in the printing.
I think that you're wrong on this one, this loop is used only to
collect classes that have template parameters. This is how I print the
template parameter names inside the square brackets.
getQualifiedNameAsString prints the class names, I haven't touched
that part so nothing gets skipped.
_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic