diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
commit | 50b73317314e889cf39c7b1d6cbf419fa7502f22 (patch) | |
tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/SemaCXX/offsetof.cpp | |
parent | dc04cb328508e61aad809d9b53b12f9799a00e7d (diff) | |
download | FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.zip FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.tar.gz |
Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661
Diffstat (limited to 'test/SemaCXX/offsetof.cpp')
-rw-r--r-- | test/SemaCXX/offsetof.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/offsetof.cpp b/test/SemaCXX/offsetof.cpp index 17cee62..a5f5d34 100644 --- a/test/SemaCXX/offsetof.cpp +++ b/test/SemaCXX/offsetof.cpp @@ -66,3 +66,10 @@ struct bar : public foo { }; int anonstruct[__builtin_offsetof(bar, x) == 0 ? 1 : -1]; + +struct LtoRCheck { + int a[10]; + int f(); +}; +int ltor = __builtin_offsetof(struct LtoRCheck, a[LtoRCheck().f]); // \ + expected-error {{reference to non-static member function must be called}} |