[libclang] Make sure we can code-complete inside a macro argument even though
the macro invocation is not fully formed.

rdar://11290992

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170824 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Index/complete-macro-args.c b/test/Index/complete-macro-args.c
index ca36af1..2f3833d 100644
--- a/test/Index/complete-macro-args.c
+++ b/test/Index/complete-macro-args.c
@@ -12,8 +12,17 @@
   MACRO(p->x);
 }
 
+#define MACRO3(x,y,z) x
+
+void test(struct Point *p) {
+  MACRO3(p->x);
+  MACRO3(p->x
+}
+
 // RUN: c-index-test -code-completion-at=%s:11:12 %s | FileCheck %s
 // RUN: c-index-test -code-completion-at=%s:12:12 %s | FileCheck %s
+// RUN: c-index-test -code-completion-at=%s:18:13 %s | FileCheck %s
+// RUN: c-index-test -code-completion-at=%s:19:13 %s | FileCheck %s
 // CHECK:      FieldDecl:{ResultType float}{TypedText x} (35)
 // CHECK-NEXT: FieldDecl:{ResultType float}{TypedText y} (35)
 // CHECK-NEXT: FieldDecl:{ResultType float}{TypedText z} (35)