[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Tue May 21 23:45:24 PDT 2024


================
@@ -73,6 +86,34 @@ MATCHER_P2(HintMatcher, Expected, Code, llvm::to_string(Expected)) {
   return true;
 }
 
+MATCHER_P2(HintLabelPieceMatcher, Expected, Code, llvm::to_string(Expected)) {
+  llvm::StringRef ExpectedView(Expected.Label);
+  std::string ResultLabel = arg.value;
+  if (ResultLabel != ExpectedView) {
----------------
HighCommander4 wrote:

nit: this is the only use of `ExpectedView`, just inline it as `Expected.Label`

https://github.com/llvm/llvm-project/pull/86629


More information about the cfe-commits mailing list