[cfe-dev] Finding function declaration?

Manuel Klimek 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>
wrote:

> 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
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150511/a05b54be/attachment.html>


More information about the cfe-dev mailing list