Ticket #7714 was fixed in ea215c3b7b
.
Add a regression test to make sure it stays fixed.
This commit is contained in:
parent
633e8632f5
commit
aa730f45c6
|
@ -172,6 +172,7 @@ private:
|
|||
TEST_CASE(const63); // ticket #5983
|
||||
TEST_CASE(const64); // ticket #6268
|
||||
TEST_CASE(const65); // ticket #8693
|
||||
TEST_CASE(const66); // ticket #7714
|
||||
TEST_CASE(const_handleDefaultParameters);
|
||||
TEST_CASE(const_passThisToMemberOfOtherClass);
|
||||
TEST_CASE(assigningPointerToPointerIsNotAConstOperation);
|
||||
|
@ -5632,6 +5633,16 @@ private:
|
|||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void const66() {
|
||||
checkConst("struct C {\n"
|
||||
" C() : n(0) {}\n"
|
||||
" void f(int v) { g((char *) &v); }\n"
|
||||
" void g(char *) { n++; }\n"
|
||||
" int n;\n"
|
||||
"};\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void const_handleDefaultParameters() {
|
||||
checkConst("struct Foo {\n"
|
||||
" void foo1(int i, int j = 0) {\n"
|
||||
|
|
Loading…
Reference in New Issue