diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2017-08-21 12:03:08 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2017-08-21 12:03:08 +0000 |
commit | f315000613e3f69485b1a2946ab58201b004c35f (patch) | |
tree | c578693e7a19fa9b8f77f225aea66a3fdd06478a /clang/test/Index/preamble-conditionals.cpp | |
parent | 7bc77e87c8c55c2ec68443d4911f2d72fde6fbf0 (diff) | |
download | bcm5719-llvm-f315000613e3f69485b1a2946ab58201b004c35f.tar.gz bcm5719-llvm-f315000613e3f69485b1a2946ab58201b004c35f.zip |
Fixed a crash on replaying Preamble's PP conditional stack.
Summary:
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.
Reviewers: erikjv, bkramer, klimek, yvvan
Reviewed By: bkramer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D36872
llvm-svn: 311330
Diffstat (limited to 'clang/test/Index/preamble-conditionals.cpp')
-rw-r--r-- | clang/test/Index/preamble-conditionals.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Index/preamble-conditionals.cpp b/clang/test/Index/preamble-conditionals.cpp new file mode 100644 index 00000000000..81ef8265e82 --- /dev/null +++ b/clang/test/Index/preamble-conditionals.cpp @@ -0,0 +1,8 @@ +// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source local %s 2>&1 \ +// RUN: | FileCheck %s --implicit-check-not "error:" +#ifndef FOO_H +#define FOO_H + +void foo(); + +#endif |