summaryrefslogtreecommitdiffstats
path: root/test/Index/preamble-conditionals-crash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/preamble-conditionals-crash.cpp')
-rw-r--r--test/Index/preamble-conditionals-crash.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Index/preamble-conditionals-crash.cpp b/test/Index/preamble-conditionals-crash.cpp
new file mode 100644
index 0000000000..6b18c87d19
--- /dev/null
+++ b/test/Index/preamble-conditionals-crash.cpp
@@ -0,0 +1,12 @@
+#ifndef HEADER_GUARD
+
+#define FOO int aba;
+FOO
+
+#endif
+// 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 "libclang: crash detected" \
+// RUN: --implicit-check-not "error:"
+// CHECK: macro expansion=FOO:3:9 Extent=[4:1 - 4:4]
+// CHECK: VarDecl=aba:4:1 (Definition) Extent=[4:1 - 4:4]