parent
a0d3c2c719
commit
9c31e0ce54
|
@ -6538,6 +6538,11 @@ void SymbolDatabase::setValueTypeInTokenList(bool reportDebugWarnings, Token *to
|
||||||
setValueType(tok, valuetype);
|
setValueType(tok, valuetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (Token::simpleMatch(tok->previous(), "= {") && tok->tokAt(-2) && tok->tokAt(-2)->valueType()) {
|
||||||
|
ValueType vt = *tok->tokAt(-2)->valueType();
|
||||||
|
setValueType(tok, vt);
|
||||||
|
}
|
||||||
|
|
||||||
// library type/function
|
// library type/function
|
||||||
else if (tok->previous()) {
|
else if (tok->previous()) {
|
||||||
if (tok->astParent() && Token::Match(tok->astOperand1(), "%name%|::")) {
|
if (tok->astParent() && Token::Match(tok->astOperand1(), "%name%|::")) {
|
||||||
|
|
|
@ -2474,6 +2474,13 @@ private:
|
||||||
true);
|
true);
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
|
check("std::string f(std::string s) {\n"
|
||||||
|
" std::string r = { s.begin(), s.end() };\n"
|
||||||
|
" return r;\n"
|
||||||
|
"}\n",
|
||||||
|
true);
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
check("struct A {\n"
|
check("struct A {\n"
|
||||||
" std::vector<std::unique_ptr<int>> mA;\n"
|
" std::vector<std::unique_ptr<int>> mA;\n"
|
||||||
" void f(std::unique_ptr<int> a) {\n"
|
" void f(std::unique_ptr<int> a) {\n"
|
||||||
|
|
Loading…
Reference in New Issue