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
Copy file name to clipboardExpand all lines: test/testautovariables.cpp
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -333,6 +333,11 @@ class TestAutoVariables : public TestFixture {
333
333
" --ptr;\n"
334
334
"}");
335
335
ASSERT_EQUALS("[test.cpp:2]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?\n", errout.str());
336
+
337
+
check("void foo(struct S* const x) {\n"// #7839
338
+
" ++x->n;\n"
339
+
"}");
340
+
ASSERT_EQUALS("", errout.str());
336
341
}
337
342
338
343
voidtestautovar11() { // #4641 - fp, assign local struct member address to function parameter
0 commit comments