We weren't always checking if children are RootStmts in ExtractFunction.
For void f([[int a]]);, the ParmVarDecl appeared as a RootStmt since
we didn't perform the check and ended up being casted to a (null) Stmt.
|  Differential  D68182  
[Clangd] Ensure children are always RootStmt in ExtractFunction (Fixes #153) Authored by SureYeaah on Sep 28 2019, 8:06 AM. 
Details 
 We weren't always checking if children are RootStmts in ExtractFunction. For void f([[int a]]);, the ParmVarDecl appeared as a RootStmt since 
Diff Detail 
 Event Timeline
 | |||||||||||||||||
can you also update the comment to mention
returns null if any child of the parent is not a root statement