diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-02-27 02:42:25 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-02-27 02:42:25 +0000 |
| commit | b8b9f28e24370d2866bd401a308ebe4c93c02178 (patch) | |
| tree | 97278259a710061a5d338db6aee48a834c76d689 /clang/test | |
| parent | af11dcf348db257e60c633e6bd2aba9df7e63653 (diff) | |
| download | bcm5719-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.c | 3 |
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 |

