diff options
author | Sam McCall <sam.mccall@gmail.com> | 2022-02-26 23:38:25 +0300 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2022-02-26 23:38:25 +0300 |
commit | 42cb812da707e7092aa3c030a44b739bbaf36b98 (patch) | |
tree | b18c54e3686b3064e6fd21f25c370266c0a14fc6 /clang-tools-extra | |
parent | 257559ed9ab74c2dd3882075c45b4ae002256425 (diff) |
[clangd] Test fixes missing from 257559ed9
Diffstat (limited to 'clang-tools-extra')
-rw-r--r-- | clang-tools-extra/clangd/unittests/InlayHintTests.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/unittests/InlayHintTests.cpp b/clang-tools-extra/clangd/unittests/InlayHintTests.cpp index d93a6e68a6ee..1054090ae716 100644 --- a/clang-tools-extra/clangd/unittests/InlayHintTests.cpp +++ b/clang-tools-extra/clangd/unittests/InlayHintTests.cpp @@ -536,6 +536,7 @@ TEST(TypeHints, Lambda) { ExpectedHint{": int", "init"}, ExpectedHint{"-> int", "ret"}); // Lambda return hint shown even if no param list. + // (The digraph :> is just a ] that doesn't conflict with the annotations). assertTypeHints("auto $L[[x]] = <:$ret[[:>]]{return 42;};", ExpectedHint{": (lambda)", "L"}, ExpectedHint{"-> int", "ret"}); @@ -624,6 +625,8 @@ TEST(TypeHints, ReturnTypeDeduction) { // Do not hint when a trailing return type is specified. auto f4() -> auto* { return "foo"; } + auto f5($noreturn[[)]] {} + // `auto` conversion operator struct A { operator auto($retConv[[)]] { return 42; } @@ -636,7 +639,8 @@ TEST(TypeHints, ReturnTypeDeduction) { }; )cpp", ExpectedHint{"-> int", "ret1a"}, ExpectedHint{"-> int", "ret1b"}, - ExpectedHint{"-> int &", "ret2"}, ExpectedHint{"-> int", "retConv"}); + ExpectedHint{"-> int &", "ret2"}, ExpectedHint{"-> void", "noreturn"}, + ExpectedHint{"-> int", "retConv"}); } TEST(TypeHints, DependentType) { |