parent
839fcddd8a
commit
57d44f1362
|
@ -955,7 +955,8 @@ const Token *Token::findmatch(const Token * const startTok, const char pattern[]
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Token::function(const Function *f) {
|
void Token::function(const Function *f)
|
||||||
|
{
|
||||||
mImpl->mFunction = f;
|
mImpl->mFunction = f;
|
||||||
if (f) {
|
if (f) {
|
||||||
if (f->isLambda())
|
if (f->isLambda())
|
||||||
|
|
|
@ -766,7 +766,7 @@ public:
|
||||||
* Associate this token with given function
|
* Associate this token with given function
|
||||||
* @param f Function to be associated
|
* @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.
|
* @return a pointer to the Function associated with this token.
|
||||||
|
|
|
@ -9250,7 +9250,7 @@ void Tokenizer::findGarbageCode() const
|
||||||
syntaxError(tok);
|
syntaxError(tok);
|
||||||
if (Token::Match(tok, "[+-] [;,)]}]") && !(isCPP() && Token::Match(tok->previous(), "operator [+-] ;")))
|
if (Token::Match(tok, "[+-] [;,)]}]") && !(isCPP() && Token::Match(tok->previous(), "operator [+-] ;")))
|
||||||
syntaxError(tok);
|
syntaxError(tok);
|
||||||
if (Token::simpleMatch(tok, ",") &&
|
if (Token::simpleMatch(tok, ",") &&
|
||||||
!Token::Match(tok->tokAt(-2), "[ = , &|%name%")) {
|
!Token::Match(tok->tokAt(-2), "[ = , &|%name%")) {
|
||||||
if (Token::Match(tok->previous(), "(|[|{|<|%assign%|%or%|%oror%|==|!=|+|-|/|!|>=|<=|~|^|::|sizeof|throw|decltype|typeof"))
|
if (Token::Match(tok->previous(), "(|[|{|<|%assign%|%or%|%oror%|==|!=|+|-|/|!|>=|<=|~|^|::|sizeof|throw|decltype|typeof"))
|
||||||
syntaxError(tok);
|
syntaxError(tok);
|
||||||
|
|
Loading…
Reference in New Issue