Skip to content

Commit 63dda39

Browse files
Update testother.cpp
1 parent 13e6df3 commit 63dda39

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎test/testother.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5086,6 +5086,11 @@ class TestOther : public TestFixture {
50865086
"void g(__attribute__((unused)) int *p) {}\n"
50875087
"void h(int *p) {}\n");
50885088
ASSERT_EQUALS("[test.cpp:3:13]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n", errout_str());
5089+
5090+
check("void f(std::vector<int>& v, int* p) {\n" // #15203
5091+
" v.push_back(*p);\n"
5092+
"};\n");
5093+
ASSERT_EQUALS("[test.cpp:1:34]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n", errout_str());
50895094
}
50905095

50915096
void constArray() {

0 commit comments

Comments
 (0)