You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -2579,8 +2584,7 @@ class TestAutoVariables : public TestFixture {
2579
2584
"const int* bar(const std::unordered_map<int, int>& m, int k) {\n"
2580
2585
" auto x = 0;\n"
2581
2586
" return get_default(m, k, &x);\n"
2582
-
"}\n",
2583
-
true);
2587
+
"}\n");
2584
2588
ASSERT_EQUALS(
2585
2589
"[test.cpp:9] -> [test.cpp:9] -> [test.cpp:8] -> [test.cpp:9]: (error, inconclusive) Returning pointer to local variable 'x' that will be invalid when returning.\n",
2586
2590
errout_str());
@@ -2813,15 +2817,13 @@ class TestAutoVariables : public TestFixture {
2813
2817
2814
2818
check("std::string f(std::string Str, int first, int last) {\n"
@@ -3599,8 +3601,7 @@ class TestAutoVariables : public TestFixture {
3599
3601
" int i = 0;\n"
3600
3602
" A a{i};\n"
3601
3603
" return a;\n"
3602
-
"}\n",
3603
-
true);
3604
+
"}\n");
3604
3605
ASSERT_EQUALS(
3605
3606
"[test.cpp:7] -> [test.cpp:6] -> [test.cpp:8]: (error, inconclusive) Returning object that points to local variable 'i' that will be invalid when returning.\n",
3606
3607
errout_str());
@@ -3613,8 +3614,7 @@ class TestAutoVariables : public TestFixture {
3613
3614
" int i = 0;\n"
3614
3615
" A a{i};\n"
3615
3616
" return a;\n"
3616
-
"}\n",
3617
-
true);
3617
+
"}\n");
3618
3618
ASSERT_EQUALS("", errout_str());
3619
3619
3620
3620
check("struct A {\n"
@@ -3767,8 +3767,7 @@ class TestAutoVariables : public TestFixture {
3767
3767
"S f() {\n"
3768
3768
" std::string m(\"abc\");\n"
3769
3769
" return S(m);\n"
3770
-
"}\n",
3771
-
true);
3770
+
"}\n");
3772
3771
ASSERT_EQUALS("", errout_str());
3773
3772
3774
3773
check("struct S {\n"
@@ -3778,8 +3777,7 @@ class TestAutoVariables : public TestFixture {
3778
3777
"S f() {\n"
3779
3778
" std::string s(\"abc\");\n"
3780
3779
" return S(s.c_str());\n"
3781
-
"}\n",
3782
-
true);
3780
+
"}\n");
3783
3781
ASSERT_EQUALS("", errout_str());
3784
3782
3785
3783
check("struct S {\n"
@@ -3791,8 +3789,7 @@ class TestAutoVariables : public TestFixture {
3791
3789
"void f(const std::stringstream& buffer) {\n"
3792
3790
" S s(buffer.str().c_str());\n"
3793
3791
" s.g();\n"
3794
-
"}\n",
3795
-
true);
3792
+
"}\n");
3796
3793
ASSERT_EQUALS("", errout_str());
3797
3794
}
3798
3795
@@ -4174,16 +4171,14 @@ class TestAutoVariables : public TestFixture {
0 commit comments