summaryrefslogtreecommitdiff
path: root/unittests/Tooling/RecursiveASTVisitorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Tooling/RecursiveASTVisitorTest.cpp')
-rw-r--r--unittests/Tooling/RecursiveASTVisitorTest.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/unittests/Tooling/RecursiveASTVisitorTest.cpp b/unittests/Tooling/RecursiveASTVisitorTest.cpp
index b3a8915a59..323476766e 100644
--- a/unittests/Tooling/RecursiveASTVisitorTest.cpp
+++ b/unittests/Tooling/RecursiveASTVisitorTest.cpp
@@ -156,17 +156,21 @@ public:
};
// 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) {