aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-16 00:55:48 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-16 00:55:48 +0000
commitd077d759d0c7fceee98f4e77b6423a3f11cfc849 (patch)
tree9d9c61b9a10e40bf3465f327d29b05e86aaee330 /test
parent8ac3af96a162a0d01331e1a32b03d081be49d19b (diff)
PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/PCH/exprs.c8
-rw-r--r--test/PCH/exprs.h9
2 files changed, 17 insertions, 0 deletions
diff --git a/test/PCH/exprs.c b/test/PCH/exprs.c
index d3d4b37a88..e08024b9bb 100644
--- a/test/PCH/exprs.c
+++ b/test/PCH/exprs.c
@@ -64,6 +64,14 @@ void_ptr vp1 = &integer;
// ExtVectorElementExpr
ext_vector_element *double_ptr5 = &floating;
+// InitListExpr
+double get_from_double_array(unsigned Idx) { return double_array[Idx]; }
+
+/// DesignatedInitExpr
+float get_from_designated(unsigned Idx) {
+ return designated_inits[2].y;
+}
+
// TypesCompatibleExpr
types_compatible *int_ptr7 = &integer;
diff --git a/test/PCH/exprs.h b/test/PCH/exprs.h
index a928b9b2e8..43fd89595e 100644
--- a/test/PCH/exprs.h
+++ b/test/PCH/exprs.h
@@ -61,6 +61,15 @@ typedef __attribute__(( ext_vector_type(2) )) double double2;
extern double2 vec2, vec2b;
typedef typeof(vec2.x) ext_vector_element;
+// InitListExpr
+double double_array[3] = { 1.0, 2.0 };
+
+// DesignatedInitExpr
+struct {
+ int x;
+ float y;
+} designated_inits[3] = { [0].y = 17, [2].x = 12.3, 3.5 };
+
// TypesCompatibleExpr
typedef typeof(__builtin_types_compatible_p(float, double)) types_compatible;