search for: madsravn

Displaying 2 results from an estimated 2 matches for "madsravn".

2016 Nov 28
2
Looking for help with an ast matcher
...led twice seems weird. Try to replace second one with > "onImplicitObjectArgument", or "on", or in the worst case - "has" (which > would not be totally valid). > > > Piotr. > > 2016-11-28 <20%2016%2011%2028> 9:06 GMT+01:00 Mads Ravn < > madsravn at gmail.com>: > > 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("st...
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 both str1 and str2 in