| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Token *tok = matchMemberName(var, scopeInfo); | ||
| if (Token::Match(tok, "%name%")) { | ||
| if (!tok->next() || tok->strAt(1) != "(" || (tok->tokAt(2) && tok->tokAt(2)->isLiteral())) | ||
| if (!tok->next() || tok->strAt(1) != "(" || (tok->tokAt(2) && (tok->tokAt(2)->isLiteral() || tok->tokAt(2)->isOp()))) |
There was a problem hiding this comment.
this looks fragile. Can you make sure it works with more than 1 parenthesis. I.e.:
struct Test {
static bool constant;
};
bool Test::constant((!false));
I recommend a while loop that skips ( tokens.
Sorry, something went wrong.
There was a problem hiding this comment.
Those parentheses are removed by simplifyRedundantParentheses(). Also, this change doesn't make the code more fragile than it already was.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.