summaryrefslogtreecommitdiff
path: root/test/Index/keep-going-include-cycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/keep-going-include-cycle.c')
-rw-r--r--test/Index/keep-going-include-cycle.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Index/keep-going-include-cycle.c b/test/Index/keep-going-include-cycle.c
new file mode 100644
index 0000000000000..b0fe24fa25df2
--- /dev/null
+++ b/test/Index/keep-going-include-cycle.c
@@ -0,0 +1,10 @@
+#include "cycle.h"
+#include "foo.h"
+
+// RUN: env CINDEXTEST_KEEP_GOING=1 c-index-test -test-print-type -I%S/Inputs %s 2> %t.stderr.txt | FileCheck %s
+// RUN: FileCheck -check-prefix CHECK-DIAG %s < %t.stderr.txt
+
+// Verify that we don't stop preprocessing after an include cycle.
+// CHECK: VarDecl=global_var:1:12 [type=int] [typekind=Int] [isPOD=1]
+
+// CHECK-DIAG: cycle.h:1:10: error: #include nested too deeply