aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/offsetof.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-04-14 14:01:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-04-14 14:01:31 +0000
commitdbe13110f59f48b4dbb7552b3ac2935acdeece7f (patch)
treebe1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/SemaCXX/offsetof.cpp
parent9da628931ebf2609493570f87824ca22402cc65f (diff)
Notes
Diffstat (limited to 'test/SemaCXX/offsetof.cpp')
-rw-r--r--test/SemaCXX/offsetof.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/offsetof.cpp b/test/SemaCXX/offsetof.cpp
index 17cee62d16fc..a5f5d347c282 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}}