benlangmuir added inline comments.
================ Comment at: lib/Lex/PPDirectives.cpp:2774 + // the directive blocks. + CurPPLexer->pushConditionalLevel(CI.IfLoc, /*wasskip*/false, + /*foundnonskip*/true, /*foundelse*/true); ---------------- akyrtzi wrote: > benlangmuir wrote: > > Why is wasSkipping false here? > For `#if` it sets `wasskip` to `true` to indicate later for > `HandleElseDirective` that the block should not be skipped. > But here (inside `HandleElseDirective`) setting `wasskip` doesn't really > affect anything, the `HandleEndifDirective` doesn't check it. I chose to set > it to `false` as indication that the `#else` block does get parsed. Thanks for explaining. That makes sense to me. https://reviews.llvm.org/D34263 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits