diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-02 21:06:53 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-02 21:06:53 +0000 |
commit | 25b7e05b72d7a666be3294bdad43e206f30c53ee (patch) | |
tree | d93efb62aa02e44bf993b2508dea4e9cdf53344f /clang/test/Index/annotate-nested-name-specifier.cpp | |
parent | fb55f851a5165dda9265531d76f95472cd42ab82 (diff) | |
download | bcm5719-llvm-25b7e05b72d7a666be3294bdad43e206f30c53ee.tar.gz bcm5719-llvm-25b7e05b72d7a666be3294bdad43e206f30c53ee.zip |
Fix the source range for a member access expression that includes a
nested-name-specifier and improve the detection of implicit 'this'
bases. Fixes <rdar://problem/8750392>.
llvm-svn: 126880
Diffstat (limited to 'clang/test/Index/annotate-nested-name-specifier.cpp')
-rw-r--r-- | clang/test/Index/annotate-nested-name-specifier.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/clang/test/Index/annotate-nested-name-specifier.cpp b/clang/test/Index/annotate-nested-name-specifier.cpp index b315b7eb199..b7570d97e17 100644 --- a/clang/test/Index/annotate-nested-name-specifier.cpp +++ b/clang/test/Index/annotate-nested-name-specifier.cpp @@ -126,7 +126,18 @@ struct X7 { typedef outer_alias::inner::apply_meta<T_type, U_type::template apply> type; }; -// RUN: c-index-test -test-annotate-tokens=%s:13:1:128:1 %s | FileCheck %s +struct X8 { + void f(); +}; + +struct X9 : X8 { + typedef X8 inherited; + void f() { + inherited::f(); + } +}; + +// RUN: c-index-test -test-annotate-tokens=%s:13:1:137:1 %s | FileCheck %s // CHECK: Keyword: "using" [14:1 - 14:6] UsingDeclaration=vector[4:12] // CHECK: Identifier: "outer_alias" [14:7 - 14:18] NamespaceRef=outer_alias:10:11 @@ -449,3 +460,7 @@ struct X7 { // CHECK: Punctuation: ">" [126:72 - 126:73] TypedefDecl=type:126:74 (Definition) // CHECK: Identifier: "type" [126:74 - 126:78] TypedefDecl=type:126:74 (Definition) +// Member access expressions +// CHECK: Identifier: "inherited" [136:5 - 136:14] TypeRef=inherited:134:14 +// CHECK: Punctuation: "::" [136:14 - 136:16] MemberRefExpr=f:130:8 +// CHECK: Identifier: "f" [136:16 - 136:17] MemberRefExpr=f:130:8 |