ilya-biryukov added inline comments.

================
Comment at: lib/Parse/Parser.cpp:519
   ConsumeToken();
-
-  PP.replayPreambleConditionalStack();
+  if (!PP.isCurrentLexer(nullptr))
+    PP.replayPreambleConditionalStack();
----------------
ilya-biryukov wrote:
> This certainly fixes the crash, but aren't we breaking other things if we 
> don't run `replayConditionalStack`?
> I.e. won't we get spurious errors on `#endif`?
I get a spurious `#endif without #if` error with your fix. We need to figure 
out the right place to run `replayPreambleConditionalStack`.

@erikjv, any ideas?


https://reviews.llvm.org/D36458



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to