Skip to content

Commit 85ee700

Browse files
Update testother.cpp
1 parent e618844 commit 85ee700

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
@@ -5087,6 +5087,12 @@ class TestOther : public TestFixture {
50875087
"void g(__attribute__((unused)) int *p) {}\n"
50885088
"void h(int *p) {}\n");
50895089
ASSERT_EQUALS("[test.cpp:3:13]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n", errout_str());
5090+
5091+
check("int* f(int* s) {\n" // #15219
5092+
" int* q = s - 1;\n"
5093+
" return q;\n"
5094+
"}\n");
5095+
ASSERT_EQUALS("", errout_str());
50905096
}
50915097

50925098
void constArray() {

0 commit comments

Comments
 (0)