Displaying 3 results from an estimated 3 matches for "hascondition".
2016 Nov 28
2
Looking for help with an ast matcher
...ment
on it on the clang page. So I wouldn't know how it works or what it does.
Best regards,
Mads Ravn
On Mon, Nov 28, 2016 at 10:50 PM Piotr Padlewski <piotr.padlewski at gmail.com>
wrote:
> Hi Mads,
> I formatted your matcher a little bit just to understand it:
>
> ifStmt(hasCondition(implicitCastExpr(hasImplicitDestinationType(
> isInteger()),
> has(cxxMemberCallExpr(callee(cxxMethodDecl(hasName("
> compare"))),
> hasArgument(0,
> declRefExpr().bind("str2")),
>...
2016 Nov 28
2
Looking for help with an ast matcher
Hi Piotr,
I think I found a working matcher: match
ifStmt(hasCondition(implicitCastExpr(hasImplicitDestinationType(isInteger()),
has(cxxMemberCallExpr(callee(cxxMethodDecl(hasName("compare"))),
hasArgument(0, declRefExpr().bind("str2")),
callee(memberExpr(has(declRefExpr().bind("str1"))))))))).bind("case1")
This one bind to bot...
2016 Nov 27
2
Looking for help with an ast matcher
Adding cfe-dev, because it is related to clang, not LLVM.
2016-11-27 22:34 GMT+01:00 Piotr Padlewski <piotr.padlewski at gmail.com>:
> Hi Mads,
> Can you provide the code that you run clang-query on, or at least AST for
> the fragment you want to match?
>
> Piotr
>
> 2016-11-26 22:27 GMT+01:00 Mads Ravn via llvm-dev <llvm-dev at lists.llvm.org
> >:
>