| 110 | } |
| 111 | |
| 112 | static bool isExecutableScope(const Token* tok) |
| 113 | { |
| 114 | if (!Token::simpleMatch(tok, "{")) |
| 115 | return false; |
| 116 | const Token * tok2 = tok->link()->previous(); |
| 117 | if (Token::simpleMatch(tok2, "; }")) |
| 118 | return true; |
| 119 | if (tok2 == tok) |
| 120 | return false; |
| 121 | if (Token::simpleMatch(tok2, "} }")) { // inner scope |
| 122 | const Token* startTok = tok2->link(); |
| 123 | if (Token::Match(startTok->previous(), "do|try|else {")) |
| 124 | return true; |
| 125 | if (Token::Match(startTok->previous(), ")|] {")) |
| 126 | return !findLambdaStartToken(tok2); |
| 127 | return isExecutableScope(startTok); |
| 128 | } |
| 129 | return false; |
| 130 | } |
| 131 | |
| 132 | const Token* SymbolDatabase::isEnumDefinition(const Token* tok) |
| 133 | { |
no test coverage detected