Fixed #5279 (False positive: warning (uninitMemberVar): Member variable 'ToDoubleArray::mfNaN' is not initialized in the constructor. (modified #5170 example))
This commit is contained in:
parent
14c8140536
commit
5539e9ea0f
|
@ -550,6 +550,8 @@ void CheckClass::initializeVarList(const Function &func, std::list<const Functio
|
||||||
ftok = ftok->tokAt(2);
|
ftok = ftok->tokAt(2);
|
||||||
|
|
||||||
// Skip "classname :: "
|
// Skip "classname :: "
|
||||||
|
if (Token::Match(ftok, ":: %var% "))
|
||||||
|
ftok = ftok->next();
|
||||||
while (Token::Match(ftok, "%var% ::"))
|
while (Token::Match(ftok, "%var% ::"))
|
||||||
ftok = ftok->tokAt(2);
|
ftok = ftok->tokAt(2);
|
||||||
|
|
||||||
|
|
|
@ -1923,6 +1923,14 @@ private:
|
||||||
" }\n"
|
" }\n"
|
||||||
"};");
|
"};");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
check("class A {\n"
|
||||||
|
" double d;\n"
|
||||||
|
"public:\n"
|
||||||
|
" A() {\n"
|
||||||
|
" ::rtl::math::setNan(&d);\n"
|
||||||
|
" }\n"
|
||||||
|
"};");
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitVarArray1() {
|
void uninitVarArray1() {
|
||||||
|
|
Loading…
Reference in New Issue