Fixed fix for #6056
This commit is contained in:
parent
49bafa10a0
commit
eac2d58c9e
|
@ -2590,7 +2590,7 @@ void Tokenizer::setVarId()
|
|||
if (!tok3->isStandardType() && tok3->str() != "void" && !Token::Match(tok3, "struct|union|class %type%") && tok3->str() != "." && !Token::Match(tok2->link()->previous(), "[&*]")) {
|
||||
bool isDecl = true;
|
||||
for (; tok3; tok3 = tok3->nextArgument()) {
|
||||
if (tok3->strAt(-1) == "&" || tok3->strAt(-1) == "*" || (notstart.find(tok3->str()) == notstart.end() && setVarIdParseDeclaration(&tok3, variableId, executableScope.top(), isCPP()))) {
|
||||
if (tok3->strAt(-2) == "&" || tok3->strAt(-2) == "*" || (notstart.find(tok3->str()) == notstart.end() && setVarIdParseDeclaration(&tok3, variableId, executableScope.top(), isCPP()))) {
|
||||
isDecl = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -4639,6 +4639,7 @@ private:
|
|||
" int method_with_internal(int&);\n"
|
||||
" int method_with_internal(A* b, X&);\n"
|
||||
" int method_with_internal(X&, A* b);\n"
|
||||
" int method_with_internal(const B &, int);\n"
|
||||
"};";
|
||||
ASSERT_EQUALS("\n\n##file 0\n"
|
||||
"1: class Fred {\n"
|
||||
|
@ -4647,7 +4648,8 @@ private:
|
|||
"4: int method_with_internal ( int & ) ;\n"
|
||||
"5: int method_with_internal ( A * b@1 , X & ) ;\n"
|
||||
"6: int method_with_internal ( X & , A * b@2 ) ;\n"
|
||||
"7: } ;\n", tokenizeDebugListing(code, false, "test.cpp"));
|
||||
"7: int method_with_internal ( const B & , int ) ;\n"
|
||||
"8: } ;\n", tokenizeDebugListing(code, false, "test.cpp"));
|
||||
}
|
||||
|
||||
void varid_initList() {
|
||||
|
|
Loading…
Reference in New Issue