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
@@ -2564,8 +2569,7 @@ class TestAutoVariables : public TestFixture {
2564
2569
"const int* bar(const std::unordered_map<int, int>& m, int k) {\n"
2565
2570
" auto x = 0;\n"
2566
2571
" return get_default(m, k, &x);\n"
2567
-
"}\n",
2568
-
true);
2572
+
"}\n");
2569
2573
ASSERT_EQUALS(
2570
2574
"[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",
2571
2575
errout_str());
@@ -2798,15 +2802,13 @@ class TestAutoVariables : public TestFixture {
2798
2802
2799
2803
check("std::string f(std::string Str, int first, int last) {\n"
@@ -3550,8 +3552,7 @@ class TestAutoVariables : public TestFixture {
3550
3552
" int i = 0;\n"
3551
3553
" A a{i};\n"
3552
3554
" return a;\n"
3553
-
"}\n",
3554
-
true);
3555
+
"}\n");
3555
3556
ASSERT_EQUALS(
3556
3557
"[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",
3557
3558
errout_str());
@@ -3564,8 +3565,7 @@ class TestAutoVariables : public TestFixture {
3564
3565
" int i = 0;\n"
3565
3566
" A a{i};\n"
3566
3567
" return a;\n"
3567
-
"}\n",
3568
-
true);
3568
+
"}\n");
3569
3569
ASSERT_EQUALS("", errout_str());
3570
3570
3571
3571
check("struct A {\n"
@@ -3718,8 +3718,7 @@ class TestAutoVariables : public TestFixture {
3718
3718
"S f() {\n"
3719
3719
" std::string m(\"abc\");\n"
3720
3720
" return S(m);\n"
3721
-
"}\n",
3722
-
true);
3721
+
"}\n");
3723
3722
ASSERT_EQUALS("", errout_str());
3724
3723
3725
3724
check("struct S {\n"
@@ -3729,8 +3728,7 @@ class TestAutoVariables : public TestFixture {
3729
3728
"S f() {\n"
3730
3729
" std::string s(\"abc\");\n"
3731
3730
" return S(s.c_str());\n"
3732
-
"}\n",
3733
-
true);
3731
+
"}\n");
3734
3732
ASSERT_EQUALS("", errout_str());
3735
3733
3736
3734
check("struct S {\n"
@@ -3742,8 +3740,7 @@ class TestAutoVariables : public TestFixture {
3742
3740
"void f(const std::stringstream& buffer) {\n"
3743
3741
" S s(buffer.str().c_str());\n"
3744
3742
" s.g();\n"
3745
-
"}\n",
3746
-
true);
3743
+
"}\n");
3747
3744
ASSERT_EQUALS("", errout_str());
3748
3745
}
3749
3746
@@ -4101,16 +4098,14 @@ class TestAutoVariables : public TestFixture {
0 commit comments