blob: 060c1b510ccff6f7ab7cd5c07bdfadf4ad57af5c [file] [log] [blame]
Douglas Gregorbd300312009-03-12 16:53:44 +00001// RUN: clang -fsyntax-only -verify %s
2
3template<int I, int J>
4struct Bitfields {
5 int simple : I; // expected-error{{bit-field 'simple' has zero width}}
6 int parens : (J);
7};
8
9void test_Bitfields(Bitfields<0, 5> *b) {
10 (void)sizeof(Bitfields<10, 5>);
11 (void)sizeof(Bitfields<0, 1>); // expected-note{{in instantiation of template class 'struct Bitfields<0, 1>' requested here}}
12}