libclang: Execute clang_codeCompleteAt() inside a crash recovery context.
 - Test case is disabled for now, because something isn't write with file
   remapping.

llvm-svn: 111581
diff --git a/clang/test/Index/crash-recovery-code-complete.c b/clang/test/Index/crash-recovery-code-complete.c
new file mode 100644
index 0000000..be834fb
--- /dev/null
+++ b/clang/test/Index/crash-recovery-code-complete.c
@@ -0,0 +1,11 @@
+// RUN: echo env CINDEXTEST_EDITING=1 \
+// RUN:   not c-index-test -code-completion-at=%s:20:1 \
+// RUN:   -remap-file="%s;%S/Inputs/crash-recovery-code-complete-remap.c" \
+// RUN:   %s 2> %t.err
+// RUN: FileCheck < %t.err -check-prefix=CHECK-CODE-COMPLETE-CRASH %s
+// CHECK-CODE-COMPLETE-CRASH: Unable to reparse translation unit
+//
+// XFAIL: win32
+// XFAIL: *
+
+#warning parsing original file