Differential Revision: https://reviews.llvm.org/D135857
// FIXME: Support extraction from templated functions.
if (Func->isTemplated())
return nullptr;
+ if (!Func->getBody())
+ return nullptr;
for (const auto *S : Func->getBody()->children()) {
// During apply phase, we perform semantic analysis (e.g. figure out
// what variables requires hoisting). We cannot perform those when the
// Shouldn't crash.
EXPECT_EQ(apply("void f([[int a]]);"), "unavailable");
+ EXPECT_EQ(apply("void f(int a = [[1]]);"), "unavailable");
// Don't extract if we select the entire function body (CompoundStmt).
std::string CompoundFailInput = R"cpp(
void f() [[{