Fixed #7926 (Memory Leak with auto not detected)
This commit is contained in:
parent
9dc219f1ba
commit
45c5860ca4
|
@ -4852,7 +4852,7 @@ void SymbolDatabase::setValueTypeInTokenList(Token *tokens, bool cpp, const Sett
|
|||
vt.pointer = 1;
|
||||
const Token * const typeTok = tok->next();
|
||||
vt.type = ValueType::typeFromString(typeTok->str(), typeTok->isLong());
|
||||
if (vt.type == ValueType::Type::UNKNOWN_TYPE && typeTok->isStandardType())
|
||||
if (vt.type == ValueType::Type::UNKNOWN_TYPE)
|
||||
vt.fromLibraryType(typeTok->str(), settings);
|
||||
if (typeTok->isUnsigned())
|
||||
vt.sign = ValueType::Sign::UNSIGNED;
|
||||
|
|
|
@ -4291,6 +4291,7 @@ private:
|
|||
ValueType vt;
|
||||
ASSERT_EQUALS(true, vt.fromLibraryType("u32", &settingsWin64));
|
||||
ASSERT_EQUALS(ValueType::Type::INT, vt.type);
|
||||
ASSERT_EQUALS("unsigned int *", typeOf(";void *data = new u32[10];", "new", "test.cpp", &settingsWin64));
|
||||
}
|
||||
{
|
||||
// PlatformType
|
||||
|
|
Loading…
Reference in New Issue