Preprocessor::getConfigs: Handle invalid #else better
This commit is contained in:
parent
f30816c145
commit
f931c0cf2b
|
@ -248,8 +248,10 @@ static void getConfigs(const simplecpp::TokenList &tokens, std::set<std::string>
|
||||||
} else if (cmdtok->str == "else") {
|
} else if (cmdtok->str == "else") {
|
||||||
if (!configs_if.empty())
|
if (!configs_if.empty())
|
||||||
configs_if.pop_back();
|
configs_if.pop_back();
|
||||||
configs_if.push_back(configs_ifndef.back());
|
if (!configs_ifndef.empty()) {
|
||||||
ret.insert(cfg(configs_if));
|
configs_if.push_back(configs_ifndef.back());
|
||||||
|
ret.insert(cfg(configs_if));
|
||||||
|
}
|
||||||
} else if (cmdtok->str == "endif" && !sameline(tok, cmdtok->next)) {
|
} else if (cmdtok->str == "endif" && !sameline(tok, cmdtok->next)) {
|
||||||
if (!configs_if.empty())
|
if (!configs_if.empty())
|
||||||
configs_if.pop_back();
|
configs_if.pop_back();
|
||||||
|
|
Loading…
Reference in New Issue