I want to use clang-query to match any callExpr
inside a cxxCtorInitializer
and bind to the initializer. I tried match callExpr(hasAncestor(cxxCtorInitializer().bind("ctor-init")))
but to no avail.
My test file is:
int F(int i) { return i; }
struct S {
S(int j) : m{F(j)} {}
int m;
};