added unit test for #2482

This commit is contained in:
Daniel Marjamäki 2011-01-19 20:41:46 +01:00
parent ecac93ebed
commit b1b8ea6457
1 changed files with 5 additions and 0 deletions

View File

@ -182,10 +182,15 @@ private:
void structinit()
{
// #2462 - C++0x struct initialization
check("void f() {\n"
" ABC abc{1,2,3};\n"
"}\n");
ASSERT_EQUALS("", errout.str());
// #2482 - false positive for empty struct
check("struct A {};");
ASSERT_EQUALS("", errout.str());
}
};