Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/testautovariables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4033,7 +4033,7 @@ class TestAutoVariables : public TestFixture {
"}");
ASSERT_EQUALS(
"[test.cpp:3:28] -> [test.cpp:3:28] -> [test.cpp:2:9] -> [test.cpp:4:12]: (error) Returning object that points to local variable 'i' that will be invalid when returning. [returnDanglingLifetime]\n"
"[test.cpp:3:32] -> [test.cpp:3:32] -> [test.cpp:2:9] -> [test.cpp:4:12]: (error) Returning object that points to local variable 'i' that will be invalid when returning. [returnDanglingLifetime]\n", // duplicate
"[test.cpp:3:32] -> [test.cpp:3:32] -> [test.cpp:2:9] -> [test.cpp:4:12]: (error) Returning object that points to local variable 'i' that will be invalid when returning. [returnDanglingLifetime]\n",
errout_str());

check("std::vector<int*> f() {\n"
Expand All @@ -4043,7 +4043,7 @@ class TestAutoVariables : public TestFixture {
"}");
ASSERT_EQUALS(
"[test.cpp:3:25] -> [test.cpp:3:25] -> [test.cpp:2:9] -> [test.cpp:4:12]: (error) Returning object that points to local variable 'i' that will be invalid when returning. [returnDanglingLifetime]\n"
"[test.cpp:3:29] -> [test.cpp:3:29] -> [test.cpp:2:9] -> [test.cpp:4:12]: (error) Returning object that points to local variable 'i' that will be invalid when returning. [returnDanglingLifetime]\n", // duplicate
"[test.cpp:3:29] -> [test.cpp:3:29] -> [test.cpp:2:9] -> [test.cpp:4:12]: (error) Returning object that points to local variable 'i' that will be invalid when returning. [returnDanglingLifetime]\n",
errout_str());

check("std::vector<int*> f() {\n"
Expand All @@ -4052,7 +4052,7 @@ class TestAutoVariables : public TestFixture {
"}");
ASSERT_EQUALS(
"[test.cpp:3:13] -> [test.cpp:3:13] -> [test.cpp:2:9] -> [test.cpp:3:12]: (error) Returning object that points to local variable 'i' that will be invalid when returning. [returnDanglingLifetime]\n"
"[test.cpp:3:17] -> [test.cpp:3:17] -> [test.cpp:2:9] -> [test.cpp:3:12]: (error) Returning object that points to local variable 'i' that will be invalid when returning. [returnDanglingLifetime]\n", // duplicate
"[test.cpp:3:17] -> [test.cpp:3:17] -> [test.cpp:2:9] -> [test.cpp:3:12]: (error) Returning object that points to local variable 'i' that will be invalid when returning. [returnDanglingLifetime]\n",
errout_str());

check("std::vector<int*> f(int& x) {\n"
Expand Down
2 changes: 1 addition & 1 deletion test/testbool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class TestBool : public TestFixture {
"}");
ASSERT_EQUALS(
"[test.cpp:2:17]: (warning) Comparison of a boolean expression with an integer other than 0 or 1. [compareBoolExpressionWithInt]\n"
"[test.cpp:2:32]: (warning) Comparison of a boolean expression with an integer other than 0 or 1. [compareBoolExpressionWithInt]\n", // duplicate
"[test.cpp:2:32]: (warning) Comparison of a boolean expression with an integer other than 0 or 1. [compareBoolExpressionWithInt]\n",
errout_str());

check("void f(int x) {\n"
Expand Down
2 changes: 1 addition & 1 deletion test/testfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class TestFunctions : public TestFixture {
"}");
ASSERT_EQUALS(
"[test.cpp:2:22]: (style) Obsolescent function 'index' called. It is recommended to use 'strchr' instead. [indexCalled]\n"
"[test.cpp:2:37]: (style) Obsolescent function 'index' called. It is recommended to use 'strchr' instead. [indexCalled]\n", // duplicate
"[test.cpp:2:37]: (style) Obsolescent function 'index' called. It is recommended to use 'strchr' instead. [indexCalled]\n",
errout_str());
}

Expand Down
2 changes: 1 addition & 1 deletion test/testother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7707,7 +7707,7 @@ class TestOther : public TestFixture {
"}");
ASSERT_EQUALS(
"[test.cpp:2:22]: (style) Same expression on both sides of '&'. [duplicateExpression]\n"
"[test.cpp:2:29]: (style) Same expression on both sides of '&'. [duplicateExpression]\n", // duplicate
"[test.cpp:2:29]: (style) Same expression on both sides of '&'. [duplicateExpression]\n",
errout_str());

}
Expand Down
Loading