[cfe-dev] SourceLocation of FunctionDecl

Nimrod Partush nimrodpar at gmail.com
Wed Nov 3 02:24:11 PDT 2010


I see your point. I'll try and have a go at solving the SourceLocation
problem. Could you point me to the relevant code parts? (i'm assuming the
problem is in the AST creation part and not specifically in the getLocation
functions)

p.s. another problem:

When asking for the qualifiers of:

const int f();

I get null. Am i doing something wrong?


Thanks.

On Tue, Nov 2, 2010 at 8:15 PM, Douglas Gregor <dgregor at apple.com> wrote:

>
> On Nov 2, 2010, at 10:50 AM, Nimrod Partush wrote:
>
> > Yes that would be nice to have.
> >
> > But i think the greater issue here is the correctness of the location
> retrieval functions. GetLocStart for a FunctionDecl should retrieve the
> start of the decleration, including storage class, etc. Overall, many times
> I've seen these function miss the target and that's a shame.
>
> Then please file bugs or (better yet) submit patches.
>
> It's not always clear-cut what these functions should do. For example,
> consider:
>
>        int f(), g();
>
> Where is the start of f() and the start of g()? They probably shouldn't
> overlap, but that means either leaving the decl-specifier-seq out of both of
> them or only placing the decl-specifier-seq only on f(), both of which are
> weird.
>
>        - Doug
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101103/8a379728/attachment.html>


More information about the cfe-dev mailing list