Skip to content

Commit 0a7f693

Browse files
Update testautovariables.cpp
1 parent 1322c81 commit 0a7f693

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/testautovariables.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2962,6 +2962,15 @@ class TestAutoVariables : public TestFixture {
29622962
" int m;\n"
29632963
"}\n");
29642964
ASSERT_EQUALS("", errout_str());
2965+
2966+
check("std::string to_string(const char* p) {\n" // #14818
2967+
" return p;\n"
2968+
"}\n"
2969+
"std::string get() {\n"
2970+
" std::string s;\n"
2971+
" return to_string(s.c_str());\n"
2972+
"}\n");
2973+
ASSERT_EQUALS("", errout_str());
29652974
}
29662975

29672976
void danglingLifetimeContainerView()

0 commit comments

Comments
 (0)