[cfe-dev] clang-tidy: Tool for removing "this->" from source code?
kfunk at kde.org
Tue Jun 9 00:59:38 PDT 2015
On Tuesday 09 June 2015 06:27:02 Wilhelm wrote:
> Am 08.06.2015 um 13:54 schrieb Kevin Funk:
> > Now the part I'm struggling with is how to make sure the "member name"
> > is a non-ambiguous identifier from the current context so I can just
> > strip "this->". How can I find out the accessible declarations (or just
> > the ids) from the context of the expression referencing `this`? I'm
> > missing API to get the clang::DeclContext, plus looking up declarations
> > accessible from within this context.
I didn't get a lot of replies to my actual question, so let's maybe simplify
it a bit.
My root problem:
Given an instance of clang::Expr: how can I deduce the context of this
expression and get a list of declarations which are accessible from this
context. What API can I use for this?
This sounds trivial, but I didn't figure it out yet. Apparently I'm missing
something obvious here.
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: This is a digitally signed message part.
More information about the cfe-dev