[clang-tools-extra] 42cb812 - [clangd] Test fixes missing from 257559ed9

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 26 12:38:34 PST 2022


Author: Sam McCall
Date: 2022-02-26T21:38:25+01:00
New Revision: 42cb812da707e7092aa3c030a44b739bbaf36b98

URL: https://github.com/llvm/llvm-project/commit/42cb812da707e7092aa3c030a44b739bbaf36b98
DIFF: https://github.com/llvm/llvm-project/commit/42cb812da707e7092aa3c030a44b739bbaf36b98.diff

LOG: [clangd] Test fixes missing from 257559ed9

Added: 
    

Modified: 
    clang-tools-extra/clangd/unittests/InlayHintTests.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/unittests/InlayHintTests.cpp b/clang-tools-extra/clangd/unittests/InlayHintTests.cpp
index d93a6e68a6ee8..1054090ae716b 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) {


        


More information about the cfe-commits mailing list