diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-22 19:49:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-22 19:49:59 +0000 |
commit | 562c1f9365334335d08eb14357ebc1c68f7307fc (patch) | |
tree | db8a7571a3f6c2e1162ed320d267a958d12e1c89 /clang/test/Index/TestClassForwardDecl.m | |
parent | 8fa0e35f9775bc562eedf468fde63623b2da18bf (diff) | |
download | bcm5719-llvm-562c1f9365334335d08eb14357ebc1c68f7307fc.tar.gz bcm5719-llvm-562c1f9365334335d08eb14357ebc1c68f7307fc.zip |
Teach CIndex's cursor visitor to restrict its traversal to a specific
region of interest (if provided). Implement clang_getCursor() in terms
of this traversal rather than using the Index library; the unified
cursor visitor is more complete, and will be The Way Forward.
Minor other tweaks needed to make this work:
- Extend Preprocessor::getLocForEndOfToken() to accept an offset
from the end, making it easy to move to the last character in the
token (rather than just past the end of the token).
- In Lexer::MeasureTokenLength(), the length of whitespace is zero.
llvm-svn: 94200
Diffstat (limited to 'clang/test/Index/TestClassForwardDecl.m')
-rw-r--r-- | clang/test/Index/TestClassForwardDecl.m | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/test/Index/TestClassForwardDecl.m b/clang/test/Index/TestClassForwardDecl.m index ffb96f4f38d..c53453b0ba8 100644 --- a/clang/test/Index/TestClassForwardDecl.m +++ b/clang/test/Index/TestClassForwardDecl.m @@ -15,17 +15,12 @@ void function(Foo * arg) // CHECK-scan: {start_line=1 start_col=1 end_line=7 end_col=1} Invalid Cursor => NoDeclFound // CHECK-scan: {start_line=8 start_col=1 end_line=8 end_col=7} UnexposedDecl=:8:1 // CHECK-scan: {start_line=8 start_col=8 end_line=8 end_col=10} ObjCClassRef=Foo:8:8 -// CHECK-scan: {start_line=8 start_col=11 end_line=9 end_col=1} Invalid Cursor => NoDeclFound -// CHECK-scan: {start_line=10 start_col=1 end_line=10 end_col=4} FunctionDecl=function:10:6 (Definition) -// CHECK-scan: {start_line=10 start_col=5 end_line=10 end_col=5} Invalid Cursor => NoDeclFound +// CHECK-scan: {start_line=8 start_col=11 end_line=10 end_col=5} Invalid Cursor => NoDeclFound // CHECK-scan: {start_line=10 start_col=6 end_line=10 end_col=14} FunctionDecl=function:10:6 (Definition) // CHECK-scan: {start_line=10 start_col=15 end_line=10 end_col=17} ObjCClassRef=Foo:8:8 -// CHECK-scan: {start_line=10 start_col=18 end_line=10 end_col=18} FunctionDecl=function:10:6 (Definition) -// CHECK-scan: {start_line=10 start_col=19 end_line=10 end_col=19} ParmDecl=arg:10:21 -// CHECK-scan: {start_line=10 start_col=20 end_line=10 end_col=20} FunctionDecl=function:10:6 (Definition) -// CHECK-scan: {start_line=10 start_col=21 end_line=10 end_col=23} ParmDecl=arg:10:21 +// CHECK-scan: {start_line=10 start_col=18 end_line=10 end_col=23} ParmDecl=arg:10:21 (Definition) +// CHECK-scan: {start_line=10 start_col=24 end_line=10 end_col=25} FunctionDecl=function:10:6 (Definition) // CHECK-scan: {start_line=11 start_col=1 end_line=13 end_col=1} UnexposedStmt=function -// CHECK-scan: {start_line=13 start_col=2 end_line=46 end_col=1} Invalid Cursor => NoDeclFound |