Skip to content

Commit f275867

Browse files
Update testother.cpp
1 parent 17e8443 commit f275867

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/testother.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12903,6 +12903,13 @@ class TestOther : public TestFixture {
1290312903
" cif::condition mWhere;\n"
1290412904
"};\n");
1290512905
ASSERT_EQUALS("", errout_str());
12906+
12907+
check("void g(std::string);\n" // #14928
12908+
"void f(std::string s) {\n"
12909+
" g(std::move(s));\n"
12910+
" for (char c : s) {}\n"
12911+
"}\n");
12912+
ASSERT_EQUALS("[test.cpp:4:19]: (warning) Access of moved variable 's'. [accessMoved]\n", errout_str());
1290612913
}
1290712914

1290812915
void moveTernary()

0 commit comments

Comments
 (0)