Tokenizer: Add &|&&| to Tokenizer::isFunctionHead()
This commit is contained in:
parent
1d3e39df7e
commit
0a1d10bf2f
|
@ -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();
|
||||||
|
|
|
@ -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)"
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue