Skip to content

Commit 3ab6ade

Browse files
Update testother.cpp
1 parent 8bf72f5 commit 3ab6ade

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/testother.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4685,6 +4685,12 @@ class TestOther : public TestFixture {
46854685
" x();\n"
46864686
"}\n");
46874687
ASSERT_EQUALS("[test.cpp:3:27]: (style) Variable 'p' can be declared as pointer to const [constVariablePointer]\n", errout_str());
4688+
4689+
check("int f() {\n"
4690+
" int i = 0;\n"
4691+
" return [](int* p) { return *p; }(&i);\n"
4692+
"}\n");
4693+
ASSERT_EQUALS("[test.cpp:3:20]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n", errout_str());
46884694
}
46894695

46904696
void constArray() {

0 commit comments

Comments
 (0)