From e5d71956747dc824dff758e076ff8c4054ea9497 Mon Sep 17 00:00:00 2001 From: chrchr Date: Thu, 29 Sep 2022 12:10:23 +0200 Subject: [PATCH 1/2] Fix #10802 Broken AST lambda inside for loop --- lib/tokenlist.cpp | 1 + test/testtokenize.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 3db8e0b316f..b632085eef3 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -1517,6 +1517,7 @@ static Token * createAstAtToken(Token *tok, bool cpp) } if (!tok2 || tok2->str() != ";") { if (tok2 == endPar && init1) { + createAstAtTokenInner(init1->next(), endPar, cpp); tok->next()->astOperand2(init1); tok->next()->astOperand1(tok); } diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 57843ca1959..20dfb5aea6f 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -5959,6 +5959,7 @@ class TestTokenizer : public TestFixture { ASSERT_EQUALS("forae*bc.({:(", testAst("for (a *e : {b->c()});")); ASSERT_EQUALS("fori0=iasize.(b; }));")); // #10802 // for with initializer (c++20) ASSERT_EQUALS("forab=ca:;(", testAst("for(a=b;int c:a)")); From 8d92839dbf1e3ccd758d38a0f242cdb86281d03f Mon Sep 17 00:00:00 2001 From: chrchr Date: Thu, 29 Sep 2022 12:18:58 +0200 Subject: [PATCH 2/2] Add some boost and wxwidget defines (on behalf of "david ingamells") --- cfg/boost.cfg | 4 ++++ cfg/wxwidgets.cfg | 1 + 2 files changed, 5 insertions(+) diff --git a/cfg/boost.cfg b/cfg/boost.cfg index e9ea1be9203..0702bad74d7 100644 --- a/cfg/boost.cfg +++ b/cfg/boost.cfg @@ -16,6 +16,7 @@ + @@ -92,6 +93,9 @@ + + + diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg index e561a6709c8..6d187a423e5 100644 --- a/cfg/wxwidgets.cfg +++ b/cfg/wxwidgets.cfg @@ -276,6 +276,7 @@ +