| 963 | } |
| 964 | |
| 965 | static bool isNestedInSwitch(const Scope* scope) |
| 966 | { |
| 967 | while (scope) { |
| 968 | if (scope->type == ScopeType::eSwitch) |
| 969 | return true; |
| 970 | if (scope->type == ScopeType::eUnconditional) { |
| 971 | scope = scope->nestedIn; |
| 972 | continue; |
| 973 | } |
| 974 | break; |
| 975 | } |
| 976 | return false; |
| 977 | } |
| 978 | |
| 979 | static bool isVardeclInSwitch(const Token* tok) |
| 980 | { |