ntroduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.

I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.

Take 2: this time, adjusted tests appropriately and used a "simple"
approach to the spelling location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118495 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Index/code-complete-errors.c b/test/Index/code-complete-errors.c
index 01c298c..4fe213e 100644
--- a/test/Index/code-complete-errors.c
+++ b/test/Index/code-complete-errors.c
@@ -10,7 +10,14 @@
   return ptr1 != ptr2; // CHECK: code-complete-errors.c:10:15:{10:10-10:14}{10:18-10:22}: warning: comparison of distinct pointer types ('int *' and 'float *')
 }
 
+#define expand_to_binary_function(ret, name, parm1, parm2, code) ret name(parm1, parm2) code
+
+expand_to_binary_function(int, g, int *ip, float *fp, {
+// CHECK: code-complete-errors.c:17:15:{17:12-17:14}{17:18-17:20}: warning: comparison of distinct pointer types ('int *' and 'float *')
+    return ip == fp;
+  })
+
 void g() {  }
 
-// RUN: c-index-test -code-completion-at=%s:13:12 -pedantic %s 2> %t
+// RUN: c-index-test -code-completion-at=%s:19:12 -pedantic %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK %s < %t