Java: Removed bailout added in 120073f000
This commit is contained in:
parent
995e39200b
commit
fee20bafa0
|
@ -745,7 +745,7 @@ void CheckClass::SpaceInfo::getVarList()
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the vartok was set in the if-blocks above, create a entry for this variable..
|
// If the vartok was set in the if-blocks above, create a entry for this variable..
|
||||||
if (vartok && vartok->str() != "operator" && !Token::Match(vartok->next(), "; %varid% =", vartok->varId()))
|
if (vartok && vartok->str() != "operator")
|
||||||
{
|
{
|
||||||
if (vartok->varId() == 0 && check->_settings->debugwarnings)
|
if (vartok->varId() == 0 && check->_settings->debugwarnings)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2244,9 +2244,27 @@ private:
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void checkUninitVarJava(const char code[])
|
||||||
|
{
|
||||||
|
// Tokenize..
|
||||||
|
Tokenizer tokenizer;
|
||||||
|
std::istringstream istr(code);
|
||||||
|
tokenizer.tokenize(istr, "test.java");
|
||||||
|
tokenizer.simplifyTokenList();
|
||||||
|
|
||||||
|
// Clear the error log
|
||||||
|
errout.str("");
|
||||||
|
|
||||||
|
// Check..
|
||||||
|
Settings settings;
|
||||||
|
settings._checkCodingStyle = true;
|
||||||
|
CheckClass checkClass(&tokenizer, &settings, this);
|
||||||
|
checkClass.constructors();
|
||||||
|
}
|
||||||
|
|
||||||
void uninitJava()
|
void uninitJava()
|
||||||
{
|
{
|
||||||
checkUninitVar("class A {\n"
|
checkUninitVarJava("class A {\n"
|
||||||
" private: int i = 0;\n"
|
" private: int i = 0;\n"
|
||||||
" public: A() { }\n"
|
" public: A() { }\n"
|
||||||
"};");
|
"};");
|
||||||
|
|
Loading…
Reference in New Issue