[cfe-dev] Finding function declaration?
klimek at google.com
Mon May 11 03:20:49 PDT 2015
On Sun, May 10, 2015 at 11:54 PM Nikola Smiljanic <popizdeh at gmail.com>
> I think you'll need to use ParentMap from ASTContext.
Note that the parent-map is lazy-built (that is, the first time you get a
parent, you build the parent-map for the whole TU), and thus has a pretty
high cost. Usually we first try to get away with not using it.
Can you give a bit more context on what you're trying to do?
> On Mon, May 11, 2015 at 4:18 AM, Ben Laurie <benl at google.com> wrote:
>> If I have a checker for check::PreStmt<ReturnStmt>, how do I get from
>> the ReturnStmt to the function it is part of (I want to check
>> attributes on that function)?
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev