diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-11-09 05:28:47 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-11-09 05:28:47 +0000 |
commit | b6278715de9530aea42ff3f9d4064fb5bed13343 (patch) | |
tree | febcc5579b67ff9719ff2fac71e13574a9c611a3 /test/Index/code-complete-errors.c | |
parent | 3d155e683a74d3783362ef1865be91544eb8a9fc (diff) |
Introduce 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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/code-complete-errors.c')
-rw-r--r-- | test/Index/code-complete-errors.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Index/code-complete-errors.c b/test/Index/code-complete-errors.c index 01c298c01d..4fe213eca6 100644 --- a/test/Index/code-complete-errors.c +++ b/test/Index/code-complete-errors.c @@ -10,7 +10,14 @@ int f(int *ptr1, float *ptr2) { 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 |