This commit is contained in:
parent
3cc3bd7066
commit
fa968d75bd
|
@ -5030,7 +5030,7 @@ static const Token * parsedecl(const Token *type, ValueType * const valuetype, V
|
|||
valuetype->type = ValueType::Type::INT;
|
||||
} else
|
||||
valuetype->type = ValueType::Type::RECORD;
|
||||
while (Token::Match(type, "%name%|*|&|::") && !type->variable()) {
|
||||
while (Token::Match(type, "%name%|*|&|::") && !type->variable() && !type->function()) {
|
||||
if (type->isSigned())
|
||||
valuetype->sign = ValueType::Sign::SIGNED;
|
||||
else if (type->isUnsigned())
|
||||
|
|
|
@ -6208,6 +6208,15 @@ private:
|
|||
" char s;\n"
|
||||
"};");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
checkInitializationListUsage("unsigned bar(std::string);\n" // #8291
|
||||
"class Foo {\n"
|
||||
"public:\n"
|
||||
" int a_, b_;\n"
|
||||
" Foo(int a, int b) : a_(a), b_(b) {}\n"
|
||||
" Foo(int a, const std::string& b) : Foo(a, bar(b)) {}\n"
|
||||
"};");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue