summaryrefslogtreecommitdiffstats
path: root/clang/test
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
commitb8b9f28e24370d2866bd401a308ebe4c93c02178 (patch)
tree97278259a710061a5d338db6aee48a834c76d689 /clang/test
parentaf11dcf348db257e60c633e6bd2aba9df7e63653 (diff)
downloadbcm5719-llvm-b8b9f28e24370d2866bd401a308ebe4c93c02178.tar.gz
bcm5719-llvm-b8b9f28e24370d2866bd401a308ebe4c93c02178.zip
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. llvm-svn: 97299
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Index/annotate-tokens.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Index/annotate-tokens.c b/clang/test/Index/annotate-tokens.c
index ef0069c8879..7fbf9cc4fb6 100644
--- a/clang/test/Index/annotate-tokens.c
+++ b/clang/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
OpenPOWER on IntegriCloud