summaryrefslogtreecommitdiff
path: root/test/SemaObjC/suspicious-pragma-pack.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/suspicious-pragma-pack.m')
-rw-r--r--test/SemaObjC/suspicious-pragma-pack.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaObjC/suspicious-pragma-pack.m b/test/SemaObjC/suspicious-pragma-pack.m
new file mode 100644
index 0000000000000..0befcaa86dc63
--- /dev/null
+++ b/test/SemaObjC/suspicious-pragma-pack.m
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -Wpragma-pack-suspicious-include -triple i686-apple-darwin9 -fsyntax-only -I%S/Inputs -verify %s
+
+#pragma pack (push, 1) // expected-note {{previous '#pragma pack' directive that modifies alignment is here}}
+#import "empty.h" // expected-warning {{non-default #pragma pack value changes the alignment of struct or union members in the included file}}
+
+#pragma pack (pop)