aboutsummaryrefslogtreecommitdiff
path: root/test/Index/annotate-nested-name-specifier.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-02 21:06:53 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-02 21:06:53 +0000
commit75e85048e73fcde2ce9d8a48dfdb1220e132eb59 (patch)
treee7158a2652222f6a9bfd39420cfffc62959b502e /test/Index/annotate-nested-name-specifier.cpp
parentd976c8e2752bc36c0697d43f985ec55b9450f8c1 (diff)
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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126880 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/annotate-nested-name-specifier.cpp')
-rw-r--r--test/Index/annotate-nested-name-specifier.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/Index/annotate-nested-name-specifier.cpp b/test/Index/annotate-nested-name-specifier.cpp
index b315b7eb19..b7570d97e1 100644
--- a/test/Index/annotate-nested-name-specifier.cpp
+++ b/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