summaryrefslogtreecommitdiff
path: root/unittests/Tooling
diff options
context:
space:
mode:
authorMichael Han <fragmentshaders@gmail.com>2013-09-12 20:59:33 +0000
committerMichael Han <fragmentshaders@gmail.com>2013-09-12 20:59:33 +0000
commit0bb3ca348517516a92579526b7f878279f33f32e (patch)
tree539bd1d3610489780e508951f6ced0b135b2d9aa /unittests/Tooling
parent8a1fdfc69cc6c2ccbfd57fc8ff643c589da9df9b (diff)
downloadclang-0bb3ca348517516a92579526b7f878279f33f32e.tar.gz
clang-0bb3ca348517516a92579526b7f878279f33f32e.tar.bz2
clang-0bb3ca348517516a92579526b7f878279f33f32e.tar.xz
Add a test case to test RAV visits parameters of implicit copy constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190632 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Tooling')
-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) {