forked from OSchip/llvm-project
Add a test case to test RAV visits parameters of implicit copy constructor.
llvm-svn: 190632
This commit is contained in:
parent
de7485af55
commit
6ca01b4b6c
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue