Skip to content

Commit 0ae94b5

Browse files
Update testtokenize.cpp
1 parent fbdf7e8 commit 0ae94b5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/testtokenize.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8709,6 +8709,10 @@ class TestTokenizer : public TestFixture {
87098709
"{ 1",
87108710
Token::Cpp11init::CPP11INIT);
87118711

8712+
testIsCpp11init("void f() { g([] { if (int x = 1; x) {} }); }", // #14790
8713+
"{ int",
8714+
Token::Cpp11init::NOINIT); // don't hang
8715+
87128716
ASSERT_NO_THROW(tokenizeAndStringify("template<typename U> struct X {};\n" // don't crash
87138717
"template<typename T> auto f(T t) -> X<decltype(t + 1)> {}\n"));
87148718
ASSERT_EQUALS("[test.cpp:2:22]: (debug) auto token with no type. [autoNoType]\n", errout_str());

0 commit comments

Comments
 (0)