Tokenizer: Add &|&&| to Tokenizer::isFunctionHead()

This commit is contained in:
Daniel Marjamäki 2016-01-02 23:09:44 +01:00
parent 1d3e39df7e
commit 0a1d10bf2f
2 changed files with 2 additions and 3 deletions

View File

@ -58,7 +58,7 @@ const Token * Tokenizer::isFunctionHead(const Token *tok, const std::string &end
return nullptr; return nullptr;
if (tok->str() == "(") if (tok->str() == "(")
tok = tok->link(); tok = tok->link();
if (Token::Match(tok, ") const| [;:{]")) { if (Token::Match(tok, ") const| &|&&| [;:{]")) {
tok = tok->next(); tok = tok->next();
if (tok->isName()) if (tok->isName())
tok = tok->next(); tok = tok->next();

View File

@ -525,8 +525,6 @@ public:
*/ */
static std::string simplifyString(const std::string &source); static std::string simplifyString(const std::string &source);
private:
/** /**
* is token pointing at function head? * is token pointing at function head?
* @param tok A '(' or ')' token in a possible function head * @param tok A '(' or ')' token in a possible function head
@ -535,6 +533,7 @@ private:
*/ */
const Token * isFunctionHead(const Token *tok, const std::string &endsWith) const; const Token * isFunctionHead(const Token *tok, const std::string &endsWith) const;
private:
/** /**
* simplify "while (0)" * simplify "while (0)"
*/ */