}
bool VisitCXXConstructExpr(CXXConstructExpr *E) {
- report(E->getLocation(), E->getConstructor(),
+ report(E->getLocation(), getMemberProvider(E->getType()),
E->getParenOrBraceRange().isValid() ? RefType::Explicit
: RefType::Implicit);
return true;
TEST(WalkAST, ConstructExprs) {
testWalk("struct $implicit^S {};", "S ^t;");
- testWalk("struct S { $implicit^S(); };", "S ^t;");
- testWalk("struct S { $explicit^S(int); };", "S ^t(42);");
- testWalk("struct S { $implicit^S(int); };", "S t = ^42;");
+ testWalk("struct $implicit^S { S(); };", "S ^t;");
+ testWalk("struct $explicit^S { S(int); };", "S ^t(42);");
+ testWalk("struct $implicit^S { S(int); };", "S t = ^42;");
+ testWalk("namespace ns { struct S{}; } using ns::$implicit^S;", "S ^t;");
}
TEST(WalkAST, Operator) {