aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/address-packed.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:11:37 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:11:37 +0000
commit461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch)
tree6942083d7d56bba40ec790a453ca58ad3baf6832 /test/SemaCXX/address-packed.cpp
parent75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff)
Notes
Diffstat (limited to 'test/SemaCXX/address-packed.cpp')
-rw-r--r--test/SemaCXX/address-packed.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/address-packed.cpp b/test/SemaCXX/address-packed.cpp
index 308c4858cd50..f0d1496fd892 100644
--- a/test/SemaCXX/address-packed.cpp
+++ b/test/SemaCXX/address-packed.cpp
@@ -112,3 +112,12 @@ void g1() {
S<float> s3;
s3.get(); // expected-note {{in instantiation of member function 'S<float>::get'}}
}
+
+// PR35509
+typedef long L1;
+struct Incomplete;
+struct S2 {
+ L1 d;
+ Incomplete *e() const;
+} __attribute__((packed));
+Incomplete *S2::e() const { return (Incomplete *)&d; } // no-warning