blob: 726dc7e5277eedb480971e50bd99b19fa9b2d94b [file] [log] [blame]
Anders Carlsson6d7f1492009-05-01 23:20:30 +00001// RUN: clang-cc -fsyntax-only -verify %s
2
3struct NonPOD {
4 virtual void f();
5 int m;
6};
7
8struct P {
9 NonPOD fieldThatPointsToANonPODType;
10};
11
12void f() {
13 int i = __builtin_offsetof(P, fieldThatPointsToANonPODType.m); // expected-error{{offset of on non-POD type 'struct P'}}
14}
15