[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / pragma-pack.c
blob2ed0874bfd2da8b409ada67695aad959cd7d5329
1 // RUN: %clang_cc1 -triple i686-apple-darwin9 -fsyntax-only -verify %s
3 /* expected-warning {{value of #pragma pack(show) == 8}} */ #pragma pack(show)
4 /* expected-warning {{expected #pragma pack parameter to be}} */ #pragma pack(3)
5 /* expected-warning {{value of #pragma pack(show) == 8}} */ #pragma pack(show)
6 #pragma pack(4)
7 /* expected-warning {{value of #pragma pack(show) == 4}} */ #pragma pack(show)
8 #pragma pack() // resets to default
9 /* expected-warning {{value of #pragma pack(show) == 8}} */ #pragma pack(show)
10 #pragma pack(2)
11 #pragma pack(push, eek, 16) // -> (eek, 2), 16
12 /* expected-warning {{value of #pragma pack(show) == 16}} */ #pragma pack(show)
13 #pragma pack(push) // -> (eek, 2), (, 2), 16
14 /* expected-warning {{value of #pragma pack(show) == 16}} */ #pragma pack(show)
15 #pragma pack(1)
16 #pragma pack(push, 8) // -> (eek, 2), (, 2), (, 1), 8
17 /* expected-warning {{value of #pragma pack(show) == 8}} */ #pragma pack(show)
18 #pragma pack(pop) // -> (eek, 2), (,2), 1
19 /* expected-warning {{value of #pragma pack(show) == 1}} */ #pragma pack(show)
20 #pragma pack(pop, eek)
21 /* expected-warning {{value of #pragma pack(show) == 2}} */ #pragma pack(show)
22 /* expected-warning {{pack(pop, ...) failed: stack empty}} */ #pragma pack(pop)
24 #pragma pack(push)
25 #pragma pack(pop, 16)
26 /* expected-warning {{value of #pragma pack(show) == 16}} */ #pragma pack(show)
29 // Warn about unbalanced pushes.
30 #pragma pack (push,4) // expected-warning {{unterminated '#pragma pack (push, ...)' at end of file}}
31 #pragma pack (push) // expected-warning {{unterminated '#pragma pack (push, ...)' at end of file}}
32 #pragma pack () // expected-note {{did you intend to use '#pragma pack (pop)' instead of '#pragma pack()'?}}