diff options
Diffstat (limited to 'test/Index/get-cursor.c')
-rw-r--r-- | test/Index/get-cursor.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Index/get-cursor.c b/test/Index/get-cursor.c index c0614af..8671810 100644 --- a/test/Index/get-cursor.c +++ b/test/Index/get-cursor.c @@ -6,11 +6,23 @@ struct _MyS ww; int x, y; +typedef union { + struct { + int field : 16; + }; +} r_t; + +void test() { + r_t reg; + reg.field = 1; +} + // RUN: c-index-test -cursor-at=%s:1:9 \ // RUN: -cursor-at=%s:2:9 \ // RUN: -cursor-at=%s:5:9 \ // RUN: -cursor-at=%s:7:5 \ // RUN: -cursor-at=%s:7:8 \ +// RUN: -cursor-at=%s:17:8 \ // RUN: %s | FileCheck %s // CHECK: StructDecl=_MyS:1:8 (Definition) @@ -18,3 +30,4 @@ int x, y; // CHECK: TypeRef=struct _MyS:1:8 // CHECK: VarDecl=x:7:5 // CHECK: VarDecl=y:7:8 +// CHECK: 17:7 MemberRefExpr=field:11:9
\ No newline at end of file |