[cfe-dev] RFC: visiting cursors "backwards" ?

Stefan Seefeld seefeld at sympatico.ca
Tue Feb 15 14:22:14 PST 2011


On 2011-02-15 17:02, Douglas Gregor wrote:
>
>> (The reason I'd very much prefer to keep this away from libclang is because these associations tend to be a matter of customization, and hard to support on a low level. Consider this:
>>
>> // E docs
>> enum E {
>>   e0,    //<  e0 docs
>>   e1}; //<  e1 docs
>>
>>
>> I think the meaning (and logical attachment) of the comments is rather obvious. Yet, this is tricky to implement: Sometimes the comments precede the declaration they are associated with, sometimes they follow them. Sometimes they are even outside the parent cursor's range.
>>
>> To support that inside libclang, one would have to parse the comment, using specific rules and markup. I'd rather leave such markup choices to the user who embeds documentation into his code.
>
> Because it's tricky to implement, it's a good candidate for going straight into Clang so that nobody has to do this work again. But, it's up to you.

OK, let's review it once I've implemented it. Then we can see whether it 
makes sense to be lowered into libclang.

     Stefan


-- 

       ...ich hab' noch einen Koffer in Berlin...




More information about the cfe-dev mailing list