File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1577,19 +1577,21 @@ TEST(TypeHints, Aliased) {
15771577}
15781578
15791579TEST (TypeHints, CallingConvention) {
1580- // Check that we don't crash for lambdas without a FunctionTypeLoc
1580+ // Check that we don't crash for lambdas with an annotation
15811581 // https://github.com/clangd/clangd/issues/2223
1582- std::string Code = R"cpp(
1582+ Annotations Source ( R"cpp(
15831583 void test() {
1584- []() __cdecl {};
1584+ []($lambda[[)]] __cdecl {};
15851585 }
1586- )cpp" ;
1587- TestTU TU = TestTU::withCode (Code );
1586+ )cpp" ) ;
1587+ TestTU TU = TestTU::withCode (Source. code () );
15881588 TU.ExtraArgs .push_back (" --target=x86_64-w64-mingw32" );
15891589 TU.PredefineMacros = true ; // for the __cdecl
15901590 auto AST = TU.build ();
15911591
1592- EXPECT_THAT (hintsOfKind (AST, InlayHintKind::Type), IsEmpty ());
1592+ EXPECT_THAT (
1593+ hintsOfKind (AST, InlayHintKind::Type),
1594+ ElementsAre (HintMatcher (ExpectedHint{" -> void" , " lambda" }, Source)));
15931595}
15941596
15951597TEST (TypeHints, Decltype) {
You can’t perform that action at this time.
0 commit comments