]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaCXX/offsetof.cpp
Update clang to 84175.
[FreeBSD/FreeBSD.git] / test / SemaCXX / offsetof.cpp
1 // RUN: clang-cc -fsyntax-only -verify %s -Winvalid-offsetof
2
3 struct NonPOD {
4   virtual void f();
5   int m;
6 };
7
8 struct P {
9   NonPOD fieldThatPointsToANonPODType;
10 };
11
12 void f() {
13   int i = __builtin_offsetof(P, fieldThatPointsToANonPODType.m); // expected-warning{{offset of on non-POD type 'struct P'}}
14 }
15