#8631: Added regression test
This commit is contained in:
parent
e1d0db38ee
commit
4ff0db1ec4
|
@ -39,6 +39,7 @@ private:
|
|||
TEST_CASE(ptrcompare);
|
||||
TEST_CASE(ptrarithmetic);
|
||||
TEST_CASE(returnIssues);
|
||||
TEST_CASE(assignment);
|
||||
}
|
||||
|
||||
void check(const char code[]) {
|
||||
|
@ -56,6 +57,15 @@ private:
|
|||
check64BitPortability.pointerassignment();
|
||||
}
|
||||
|
||||
void assignment() {
|
||||
// #8631
|
||||
check("using CharArray = char[16];\n"
|
||||
"void f() {\n"
|
||||
" CharArray foo = \"\";\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void novardecl() {
|
||||
// if the variable declarations can't be seen then skip the warning
|
||||
check("void foo()\n"
|
||||
|
|
Loading…
Reference in New Issue