SymbolDatabase: Fix type for expression 'x = uint8_t(a[b])'
This commit is contained in:
parent
cf1dd2e6f6
commit
c5c07b61a6
|
@ -5700,6 +5700,12 @@ void SymbolDatabase::setValueTypeInTokenList(bool reportDebugWarnings)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
ValueType podtype;
|
||||
if (podtype.fromLibraryType(e, mSettings)) {
|
||||
setValueType(tok, podtype);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
const std::string& typestr(mSettings->library.returnValueType(tok->previous()));
|
||||
|
|
|
@ -6568,6 +6568,7 @@ private:
|
|||
ASSERT_EQUALS("unsigned int *", typeOf(";void *data = new xyz::x[10];", "new", "test.cpp", &settingsWin64));
|
||||
ASSERT_EQUALS("unsigned int", typeOf("; x = (xyz::x)12;", "(", "test.cpp", &settingsWin64));
|
||||
ASSERT_EQUALS("unsigned int", typeOf(";u32(12);", "(", "test.cpp", &settingsWin64));
|
||||
ASSERT_EQUALS("unsigned int", typeOf("x = u32(y[i]);", "(", "test.cpp", &settingsWin64));
|
||||
}
|
||||
{
|
||||
// PlatformType
|
||||
|
|
Loading…
Reference in New Issue