summaryrefslogtreecommitdiffstats
path: root/test/PCH/cxx-offsetof-base.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH/cxx-offsetof-base.h')
-rw-r--r--test/PCH/cxx-offsetof-base.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/PCH/cxx-offsetof-base.h b/test/PCH/cxx-offsetof-base.h
new file mode 100644
index 0000000..7c78101
--- /dev/null
+++ b/test/PCH/cxx-offsetof-base.h
@@ -0,0 +1,5 @@
+// Header for PCH test cxx-offsetof-base.cpp
+
+struct Base { int x; };
+struct Derived : Base { int y; };
+int o = __builtin_offsetof(Derived, x);
OpenPOWER on IntegriCloud