aboutsummaryrefslogtreecommitdiff
path: root/test/Index/annotate-tokens.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-27 02:42:25 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-27 02:42:25 +0000
commitd1eabfb15c87837c57d1eb658d75a1f48d6fd5ed (patch)
tree1674794461bdb4baf33f78c7357f7d149707ac35 /test/Index/annotate-tokens.c
parentde431c2dc7ec3592327ab23ae315fc915c549f05 (diff)
Robustify SourceManager::getLocation(), so that it returns an
end-of-line source location when given a column number beyond the length of the line, or an end-of-file source location when given a line number beyond the length of the file. Previously, we would return an invalid location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/annotate-tokens.c')
-rw-r--r--test/Index/annotate-tokens.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Index/annotate-tokens.c b/test/Index/annotate-tokens.c
index ef0069c887..7fbf9cc4fb 100644
--- a/test/Index/annotate-tokens.c
+++ b/test/Index/annotate-tokens.c
@@ -61,4 +61,5 @@ void f(void *ptr) {
// CHECK: Literal: ""Hello"" [9:24 - 9:31]
// CHECK: Punctuation: ";" [9:31 - 9:32]
// CHECK: Punctuation: "}" [10:1 - 10:2]
-
+// RUN: c-index-test -test-annotate-tokens=%s:4:1:165:32 %s | FileCheck %s
+// RUN: c-index-test -test-annotate-tokens=%s:4:1:165:38 %s | FileCheck %s