// In 'single-file-parse mode' undefined identifiers trigger parsing of all
// the directive blocks.
CurPPLexer->pushConditionalLevel(DirectiveTok.getLocation(),
- /*wasskip*/true, /*foundnonskip*/false,
+ /*wasskip*/false, /*foundnonskip*/false,
/*foundelse*/false);
} else if (!MI == isIfndef) {
// Yes, remember that we are inside a conditional, then lex the next token.
if (PPOpts->SingleFileParseMode && DER.IncludedUndefinedIds) {
// In 'single-file-parse mode' undefined identifiers trigger parsing of all
// the directive blocks.
- CurPPLexer->pushConditionalLevel(IfToken.getLocation(), /*wasskip*/true,
+ CurPPLexer->pushConditionalLevel(IfToken.getLocation(), /*wasskip*/false,
/*foundnonskip*/false, /*foundelse*/false);
} else if (ConditionalTrue) {
// Yes, remember that we are inside a conditional, then lex the next token.
if (Callbacks)
Callbacks->Else(Result.getLocation(), CI.IfLoc);
- if (PPOpts->SingleFileParseMode && CI.WasSkipping) {
+ if (PPOpts->SingleFileParseMode && !CI.FoundNonSkip) {
// In 'single-file-parse mode' undefined identifiers trigger parsing of all
// the directive blocks.
CurPPLexer->pushConditionalLevel(CI.IfLoc, /*wasskip*/false,
- /*foundnonskip*/true, /*foundelse*/true);
+ /*foundnonskip*/false, /*foundelse*/true);
return;
}
SourceRange(ConditionalBegin, ConditionalEnd),
PPCallbacks::CVK_NotEvaluated, CI.IfLoc);
- if (PPOpts->SingleFileParseMode && CI.WasSkipping) {
+ if (PPOpts->SingleFileParseMode && !CI.FoundNonSkip) {
// In 'single-file-parse mode' undefined identifiers trigger parsing of all
// the directive blocks.
- CurPPLexer->pushConditionalLevel(ElifToken.getLocation(), /*wasskip*/true,
+ CurPPLexer->pushConditionalLevel(ElifToken.getLocation(), /*wasskip*/false,
/*foundnonskip*/false, /*foundelse*/false);
return;
}