Skip to content

Commit 7b091cc

Browse files
committed
add test
1 parent 97db45c commit 7b091cc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

clang-tools-extra/test/clang-tidy/checkers/performance/lost-std-move.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,16 @@ void f_copy_after_ref()
201201
f(ptr);
202202
*ref = 1;
203203
}
204+
205+
int f_lvalue(std::shared_ptr<int>&);
206+
int f_lvalue_const(const std::shared_ptr<int>&);
207+
208+
void f_ref_lvalue(std::shared_ptr<int> ptr)
209+
{
210+
f_lvalue(ptr); // no fix
211+
}
212+
213+
void f_ref_lvalue_const(std::shared_ptr<int> ptr)
214+
{
215+
f_lvalue_const(ptr); // no fix
216+
}

0 commit comments

Comments
 (0)