We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1380219 commit 86b80d3Copy full SHA for 86b80d3
1 file changed
test/testother.cpp
@@ -2909,6 +2909,9 @@ class TestOther : public TestFixture {
2909
check("struct X { int a[5]; }; extern \"C\" void f(X v) { }");
2910
ASSERT_EQUALS("", errout_str());
2911
2912
+ check("struct X { int a[5]; }; void f(const X v);");
2913
+ ASSERT_EQUALS("", errout_str());
2914
+
2915
check("struct X { int a[5]; }; void f(const X v) { (void) v; }");
2916
ASSERT_EQUALS("[test.cpp:1:40]: (performance) Function parameter 'v' should be passed by const reference. [passedByValue]\n", errout_str());
2917
0 commit comments