summaryrefslogtreecommitdiffstats
path: root/test/PCH/exprs.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH/exprs.h')
-rw-r--r--test/PCH/exprs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/PCH/exprs.h b/test/PCH/exprs.h
index 7012422..5af8c7c 100644
--- a/test/PCH/exprs.h
+++ b/test/PCH/exprs.h
@@ -25,6 +25,19 @@ typedef typeof('a') char_literal;
// UnaryOperator
typedef typeof(-Enumerator) negate_enum;
+// OffsetOfExpr
+struct X {
+ int member;
+};
+struct Y {
+ struct X array[5];
+};
+struct Z {
+ struct Y y;
+};
+typedef typeof(__builtin_offsetof(struct Z, y.array[1 + 2].member))
+ offsetof_type;
+
// SizeOfAlignOfExpr
typedef typeof(sizeof(int)) typeof_sizeof;
typedef typeof(sizeof(Enumerator)) typeof_sizeof2;
OpenPOWER on IntegriCloud