I get an internal AST error with this nested lambda passed to a function.
struct Foo { char ch{}; }; void takesFunc(auto f){} int main() { takesFunc([func=[](Foo i){ return i.ch;}]{}); }
test.cpp:10:39: error: Syntax Error: AST broken, 'i' doesn't have a parent. [internalAstError] takesFunc([func=[](Foo i){ return i.ch;}]{});
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/11400
Log in to post a comment.
I get an internal AST error with this nested lambda passed to a function.
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/11400