From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/SemaCXX/pragma-pack.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 clang/test/SemaCXX/pragma-pack.cpp (limited to 'clang/test/SemaCXX/pragma-pack.cpp') diff --git a/clang/test/SemaCXX/pragma-pack.cpp b/clang/test/SemaCXX/pragma-pack.cpp new file mode 100644 index 0000000..1bc738b --- /dev/null +++ b/clang/test/SemaCXX/pragma-pack.cpp @@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -triple i686-apple-darwin9 -fsyntax-only -verify %s + +namespace rdar8745206 { + +struct Base { + int i; +}; + +#pragma pack(push, 1) +struct Sub : public Base { + char c; +}; +#pragma pack(pop) + +int check[sizeof(Sub) == 5 ? 1 : -1]; + +} + +namespace check2 { + +struct Base { + virtual ~Base(); + int x; +}; + +#pragma pack(push, 1) +struct Sub : virtual Base { + char c; +}; +#pragma pack(pop) + +int check[sizeof(Sub) == 13 ? 1 : -1]; + +} -- cgit v1.2.3