summaryrefslogtreecommitdiff
path: root/clang/test/PCH/cxx-offsetof-base.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/PCH/cxx-offsetof-base.h')
-rw-r--r--clang/test/PCH/cxx-offsetof-base.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/PCH/cxx-offsetof-base.h b/clang/test/PCH/cxx-offsetof-base.h
new file mode 100644
index 0000000..7c78101
--- /dev/null
+++ b/clang/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);