diff options
author | Erik Verbruggen <erikjv@me.com> | 2017-11-03 09:40:07 +0000 |
---|---|---|
committer | Erik Verbruggen <erikjv@me.com> | 2017-11-03 09:40:07 +0000 |
commit | 16962ce7c214f12f7362c41bfbe79689bc07ea2f (patch) | |
tree | de4b9d348928f65c509e85d952e95b9d4eb8e130 /test/Index/preamble-conditionals-skipping.cpp | |
parent | 324e0a9695a1682b11e60f5c22024243fa2246d3 (diff) |
[preamble] Also record the "skipping" state of the preprocessor
When a preamble ends in a conditional preprocessor block that is being
skipped, the preprocessor needs to continue skipping that block when
the preamble is used.
This fixes PR34570.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/preamble-conditionals-skipping.cpp')
-rw-r--r-- | test/Index/preamble-conditionals-skipping.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Index/preamble-conditionals-skipping.cpp b/test/Index/preamble-conditionals-skipping.cpp new file mode 100644 index 0000000000..fa5764cd5d --- /dev/null +++ b/test/Index/preamble-conditionals-skipping.cpp @@ -0,0 +1,16 @@ +// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 \ +// RUN: local -std=c++14 %s 2>&1 \ +// RUN: | FileCheck %s --implicit-check-not "error:" + +#ifdef MYCPLUSPLUS +extern "C" { +#endif + +#ifdef MYCPLUSPLUS +} +#endif + +int main() +{ + return 0; +} |