Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Understanding Bindings

Hi all,

after crawling through the code for some hours I finally considered asking you again would be a far more easy way to help me understand the semantical bindings in CDT. In my understanding I should for example be able to get a collection of places where a certain declaration is used, or the other way around, the declaration to an IASTIdExpression. My first impression is that all the different IBinding subclasses just do not deliver those information in the first place. Most simplistic use-case would be the following scenario: I have an IASTIdExpression and I want information where this identifier was declared and all the other locations in the document where the same declaration was used. From the IASTIdExpression I get an IASTName, from there I get an IBinding, which might be of type IVariable. But now? How do I determine, for example, whether this variable is a constant and where it is also used? I'd be happy if someone would give me a short explanation or a link to further documentation (if existing) on how these things work.

greetings,
Simon



Back to the top