summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-22 02:10:41 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-22 02:10:41 +0000
commita1bed4cd96141eb92e94acd56d02167ec007626e (patch)
tree83de603fe9fa0e6b07d3786c92ecbf2abad6023b /clang/test
parentfd555f6b1fd950eff620e74da887dc37d919a276 (diff)
downloadbcm5719-llvm-a1bed4cd96141eb92e94acd56d02167ec007626e.tar.gz
bcm5719-llvm-a1bed4cd96141eb92e94acd56d02167ec007626e.zip
[libclang] Index the field references of a designated initializer, rdar://10906206
llvm-svn: 151118
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Index/index-refs.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Index/index-refs.cpp b/clang/test/Index/index-refs.cpp
index 56afa08ec88..77e2af71f88 100644
--- a/clang/test/Index/index-refs.cpp
+++ b/clang/test/Index/index-refs.cpp
@@ -61,6 +61,14 @@ typedef int some_arr[array_size];
const int default_param = 3;
void foo4(int p = default_param);
+struct S2 {
+ int x,y;
+};
+
+void foo5() {
+ struct S2 s = { .y = 1, .x = 4};
+}
+
// RUN: c-index-test -index-file %s | FileCheck %s
// CHECK: [indexDeclaration]: kind: namespace | name: NS
// CHECK-NEXT: [indexDeclaration]: kind: variable | name: gx
@@ -108,3 +116,6 @@ void foo4(int p = default_param);
// CHECK: [indexEntityReference]: kind: variable | name: array_size | {{.*}} | loc: 59:22
// CHECK: [indexEntityReference]: kind: variable | name: default_param | {{.*}} | loc: 62:19
// CHECK-NOT: [indexEntityReference]: kind: variable | name: default_param | {{.*}} | loc: 62:19
+
+// CHECK: [indexEntityReference]: kind: field | name: y | {{.*}} | loc: 69:20
+// CHECK-NEXT: [indexEntityReference]: kind: field | name: x | {{.*}} | loc: 69:28
OpenPOWER on IntegriCloud