[cfe-dev] Getting the corresponding template parameters of a template argument list in partial template specializations

Douglas Gregor dgregor at apple.com
Wed Jul 28 07:28:50 PDT 2010

On Jul 28, 2010, at 6:17 AM, Olivier Grant wrote:

> Thanks for the help.
> On another note, is there anyway to retrieve an AST representing only the input file and not the entire translation unit?

Not directly. However, you can walk the full AST and filter out those AST nodes whose source locations don't fall in the input file. Decl::getSourceLocation() gives you the location of an AST node, and you can then use the SourceManager to decompose the source location.

	- Doug

More information about the cfe-dev mailing list