struct S { S(int) {} }; void foo(int x) { [s = S(x)] {}; }
Before C++17 the AST of s = S(x) is
|-CXXConstructExpr 'S':'S' 'void (S &&) noexcept' elidable | `-MaterializeTemporaryExpr 'S':'S' xvalue | `-CXXFunctionalCastExpr 'S':'S' functional cast to S <ConstructorConversion> | `-CXXConstructExpr 'S':'S' 'void (int)' | `-ImplicitCastExpr 'int' <LValueToRValue> | `-DeclRefExpr 'int' lvalue ParmVar 'x' 'int'
With C++17 copy elision the AST of the same expression is
|-CXXFunctionalCastExpr 0x564d0bbcdfa8 <col:8, col:11> 'S':'S' functional cast to S <ConstructorConversion> | `-CXXConstructExpr 0x564d0bbcde40 <col:8, col:11> 'S':'S' 'void (int)' | `-ImplicitCastExpr 0x564d0bbcdd28 <col:10> 'int' <LValueToRValue> | `-DeclRefExpr 0x564d0bbcd990 <col:10> 'int' lvalue ParmVar 0x564d0bbcd7d0 'x' 'int'
The copy elided version wasn't handled, which lead to a crash later.