Re: [cfe-users] AST matcher behavior question

2017-10-10 Thread Rémi Cohen-Scali via cfe-users
I checked in the AST Matcher Ref doc I generated from my build tree, then either there is a doc problem, or I don't understand how to use findAll (however Matcher Matcher actually mean any matcher, then any place). Thanks PS.: Perhaps I'll create a doc bug for it ...?? *-=-=-=-=-* Rémi COHEN-SCA

Re: [cfe-users] AST matcher behavior question

2017-10-10 Thread Rémi Cohen-Scali via cfe-users
​Ok got it! I found my error. However the findAll matcher is not recognized then is it possible to use it, Is there some restrictions (that are not in AST Matchers ref) ? For the little story, the correct matcher for getting all results is something as: ​binaryOperator(hasAncestor(functionDecl(h

[cfe-users] AST matcher behavior question

2017-10-10 Thread Rémi Cohen-Scali via cfe-users
Hi I encounter a weird behavior on AST matchers and I'd like to ear what U think of it. Let get a test file void f() { int a, b, c, d; a = 1; b = 2; c = 3; d = 4; } Then query the decl matcher: functionDecl(hasName("f"),hasBody(hasDescendant(binaryOperator(hasOperatorName("=")).bind(