};
// Test RAV visits parameter variable declaration of the implicit
-// copy assignment operator.
+// copy assignment operator and implicit copy constructor.
TEST(RecursiveASTVisitor, VisitsParmVarDeclForImplicitCode) {
ParmVarDeclVisitorForImplicitCode Visitor;
- // Match parameter variable name of implicit copy assignment operator.
+ // Match parameter variable name of implicit copy assignment operator and
+ // implicit copy constructor.
// This parameter name does not have a valid IdentifierInfo, and shares
// same SourceLocation with its class declaration, so we match an empty name
// with the class' source location.
Visitor.ExpectMatch("", 1, 7);
+ Visitor.ExpectMatch("", 3, 7);
EXPECT_TRUE(Visitor.runOver(
"class X {};\n"
- "void foo(X a, X b) {a = b;}"));
+ "void foo(X a, X b) {a = b;}\n"
+ "class Y {};\n"
+ "void bar(Y a) {Y b = a;}"));
}
TEST(RecursiveASTVisitor, VisitsBaseClassDeclarations) {