We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bfbb5a commit 3e0e2b3Copy full SHA for 3e0e2b3
1 file changed
test/testtokenize.cpp
@@ -295,6 +295,7 @@ class TestTokenizer : public TestFixture {
295
TEST_CASE(simplifyInitVar2);
296
TEST_CASE(simplifyInitVar3);
297
TEST_CASE(simplifyInitVar4);
298
+ TEST_CASE(simplifyInitVar5);
299
300
TEST_CASE(bitfields1);
301
TEST_CASE(bitfields2);
@@ -4678,6 +4679,11 @@ class TestTokenizer : public TestFixture {
4678
4679
"}", tokenizeAndStringify(code));
4680
}
4681
4682
+ void simplifyInitVar5() { // #14218
4683
+ const char code[] = "int c[1]{}, b;";
4684
+ ASSERT_EQUALS("int c [ 1 ] { } ; int b ;", tokenizeAndStringify(code));
4685
+ }
4686
+
4687
void bitfields1() {
4688
const char code1[] = "struct A { bool x : 1; };";
4689
ASSERT_EQUALS("struct A { bool x ; } ;", tokenizeAndStringify(code1));
0 commit comments