Skip to content

Commit a8f90e7

Browse files
committed
add test for single-expr-only
1 parent df9ffdf commit a8f90e7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang-tools-extra/clangd/unittests/tweaks/ExtractFunctionTests.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ F (extracted();)
190190
}]]
191191
)cpp";
192192
EXPECT_EQ(apply(CompoundFailInput), "unavailable");
193+
194+
ExtraArgs.push_back("-std=c++14");
195+
// FIXME: Expressions are currently not extracted
196+
EXPECT_EQ(apply(R"cpp(
197+
void sink(int);
198+
void call() { sink([[1+1]]); }
199+
)cpp"),
200+
"unavailable");
193201
}
194202

195203
TEST_F(ExtractFunctionTest, DifferentHeaderSourceTest) {

0 commit comments

Comments
 (0)