File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,6 +304,7 @@ class TestTokenizer : public TestFixture {
304304 TEST_CASE (bitfields15); // ticket #7747 (enum Foo {A,B}:4;)
305305 TEST_CASE (bitfields16); // Save bitfield bit count
306306 TEST_CASE (bitfields17);
307+ TEST_CASE (bitfields18);
307308
308309 TEST_CASE (simplifyNamespaceStd);
309310
@@ -4846,6 +4847,12 @@ class TestTokenizer : public TestFixture {
48464847 ASSERT_EQUALS (expected2, tokenizeAndStringify (code2));
48474848 }
48484849
4850+ void bitfields18 () {
4851+ const char code[] = " struct S { unsigned int a : 100000; };" ;
4852+ (void ) tokenizeAndStringify (code);
4853+ ASSERT_EQUALS (" [test.cpp:1:29]: (warning) Bit-field size exceeds max number of bits 32767 [tooLargeBitField]\n " , errout_str ());
4854+ }
4855+
48494856 void simplifyNamespaceStd () {
48504857 const char *expected;
48514858
You can’t perform that action at this time.
0 commit comments