[cfe-dev] SourceLocation of FunctionDecl

Nimrod Partush nimrodpar at gmail.com
Tue Nov 2 07:54:29 PDT 2010


Hi,

I want to add code just before a certain function deceleration.

I do this by visiting the FunctionDecl and using it's start location for
InsertTextBefore.

The problem is that GetLocStart returns the location of the Function's name
and not the entire prototype i.e. if i have this function:

static int f() {
}

i will get the location of "f" and not the location of "static".

Help?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101102/96554342/attachment.html>


More information about the cfe-dev mailing list