We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6b00d6 commit c359dedCopy full SHA for c359ded
1 file changed
test/teststl.cpp
@@ -4713,6 +4713,12 @@ class TestStl : public TestFixture {
4713
ASSERT_EQUALS("[test.cpp:3:5]: (performance) Assigning the result of c_str() to a std::string is slow and redundant. [stlcstrAssignment]\n"
4714
"[test.cpp:4:17]: (performance) Constructing a std::string from the result of c_str() is slow and redundant. [stlcstrConstructor]\n",
4715
errout_str());
4716
+
4717
+ check("void f() {\n"
4718
+ " std::string s;\n"
4719
+ " auto a = + s.c_str();\n"
4720
+ "}\n");
4721
+ ASSERT_EQUALS("", errout_str());
4722
}
4723
4724
void uselessCalls() {
0 commit comments