[PATCH] D36872: Fixed a crash on replaying Preamble's PP conditional stack.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 18 05:34:45 PDT 2017


ilya-biryukov created this revision.

The crash occurs when the first token after a preamble is a macro
expansion.
Fixed by moving replayPreambleConditionalStack from Parser into
Preprocessor. It is now called right after the predefines file is
processed.


https://reviews.llvm.org/D36872

Files:
  include/clang/Lex/Preprocessor.h
  lib/Lex/PPLexerChange.cpp
  lib/Lex/Preprocessor.cpp
  lib/Parse/Parser.cpp
  test/Index/preamble-conditionals-crash.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36872.111656.patch
Type: text/x-patch
Size: 3633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170818/31ba4dec/attachment.bin>


More information about the cfe-commits mailing list