diff --git a/lib/token.cpp b/lib/token.cpp index 07d3516a8..7f4fe9c2f 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -955,7 +955,8 @@ const Token *Token::findmatch(const Token * const startTok, const char pattern[] return nullptr; } -void Token::function(const Function *f) { +void Token::function(const Function *f) +{ mImpl->mFunction = f; if (f) { if (f->isLambda()) diff --git a/lib/token.h b/lib/token.h index 9dfb1c687..4b6d9e597 100644 --- a/lib/token.h +++ b/lib/token.h @@ -766,7 +766,7 @@ public: * Associate this token with given function * @param f Function to be associated */ - void function(const Function *f); + void function(const Function *f); /** * @return a pointer to the Function associated with this token. diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index f77cf0025..2fd0ca113 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -9250,7 +9250,7 @@ void Tokenizer::findGarbageCode() const syntaxError(tok); if (Token::Match(tok, "[+-] [;,)]}]") && !(isCPP() && Token::Match(tok->previous(), "operator [+-] ;"))) syntaxError(tok); - if (Token::simpleMatch(tok, ",") && + if (Token::simpleMatch(tok, ",") && !Token::Match(tok->tokAt(-2), "[ = , &|%name%")) { if (Token::Match(tok->previous(), "(|[|{|<|%assign%|%or%|%oror%|==|!=|+|-|/|!|>=|<=|~|^|::|sizeof|throw|decltype|typeof")) syntaxError(tok);