summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/offsetof.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/offsetof.cpp')
-rw-r--r--clang/test/SemaCXX/offsetof.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/offsetof.cpp b/clang/test/SemaCXX/offsetof.cpp
index f0290e889a2..e18987f11ad 100644
--- a/clang/test/SemaCXX/offsetof.cpp
+++ b/clang/test/SemaCXX/offsetof.cpp
@@ -13,3 +13,6 @@ void f() {
int i = __builtin_offsetof(P, fieldThatPointsToANonPODType.m); // expected-warning{{offset of on non-POD type 'struct P'}}
}
+struct Base { int x; };
+struct Derived : Base { int y; };
+int o = __builtin_offsetof(Derived, x); // expected-warning{{offset of on non-POD type}}
OpenPOWER on IntegriCloud