[cfe-dev] Best way to get SourceLocation of a Declarator?

Dan Villiom Podlaski Christiansen danchr at daimi.au.dk
Fri Aug 29 12:24:37 PDT 2008

On 29 Aug 2008, at 20:00, Nico Weber wrote:

>>> No, I'm fiddling with ActOnDeclarator just for the heck of it, to
>>> understand how clang's parts interact ( http://amnoid.de/tmp/clangtut/tut.html
>>> :-P -- obviously far from done).
>> Nico, this looks really nice!  When it gets closer to being done,
>> are you interested in hosting it on clang.llvm.org?  I think it
>> could be useful to a whole lot of people,
> Sure, that'd be great. However, it might take a few more days (weeks?)
> until it's done.

I read some of it, and it appears very good indeed. I noticed a few  
things, and I figure I might as well provide a bit of feedback :)

> (for example, variables that have the old name but are in a  
> different namespace, and so on)

Wouldn't it be better to refer to scope rather than namespaces? Unlike  
namespaces, they aren't specific to C++, and neither are handled  
terribly gracefully by grep/sed/whatever anyway…

(After trying Eclipse with its integrated Java compiler, I can't wait  
for the day where editors do the same with clang!)

> For performance reasons, clang does not have a separate preprocessor  
> program, but does preprocessing while lexing.

It's my impression from the documentation[1] that this is much more  
than an optimisation. It seems to be what allows clang to track  
everything back to the original source rather than the pre-processed  
intermediate. “Great feature” comes to mind ;)

[1] <http://clang.llvm.org/comparison.html>


Dan Villiom Podlaski Christiansen, stud. scient.,
danchr at daimi.au.dk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1945 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080829/80f539d3/attachment.bin>

More information about the cfe-dev mailing list