We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bf72f5 commit 3ab6adeCopy full SHA for 3ab6ade
1 file changed
test/testother.cpp
@@ -4685,6 +4685,12 @@ class TestOther : public TestFixture {
4685
" x();\n"
4686
"}\n");
4687
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());
4694
}
4695
4696
void constArray() {
0 commit comments