diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 126034e48..3e40927d2 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -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())); diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index 99791c271..0dc1a6fae 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -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