[cfe-dev] Bugs 2746 and 3261

Eli Friedman eli.friedman at gmail.com
Tue Jan 13 11:08:47 PST 2009


On Tue, Jan 13, 2009 at 8:24 AM, Paolo Bolzoni <bolzoni at cs.unipr.it> wrote:
> On Mon, 12 Jan 2009 21:42:28 +0100
> Roberto Bagnara <bagnara at cs.unipr.it> wrote:
>
>> > For PR3261, I'm not sure, but you might be able to pull some tricks
>> > with location information.
>>
>> Paolo, can you please look at that?
>
> I am not sure that Eli meant, types do not have location information (at
> least in the form of SourceLocation).
>
> So when I am visiting a enum or struct type and I use getDecl(), I can get
> the source location from the declaration, but I can't know if the source
> point is where I am or not.
>
> Am I wrong?

No, but a type doesn't exist by itself; there should be an associated
declaration or expression you can get the current source location
from.

-Eli



More information about the cfe-dev mailing list