[PATCH] D150683: [clangd] Tweak "provides" hover card when symbols have the same name
Viktoriia Bakalova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 16 08:51:31 PDT 2023
VitaNuo added inline comments.
================
Comment at: clang-tools-extra/clangd/Hover.cpp:1539
+ Front, [&](llvm::StringRef Sym) { P.appendCode(Sym); },
+ [&] { P.appendText(", "); });
if (UsedSymbolNames.size() > Front.size()) {
----------------
What will this do if `Front` has an even number of elements? AFAIU the message will end in a comma then, which is not desirable.
================
Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:3492
HI.Name = "foo.h";
- HI.UsedSymbolNames = {"Foo", "Bar", "Baz"};
+ HI.UsedSymbolNames = {"Foo", "Bar", "Bar"};
},
----------------
Why did you introduce this change? This is just a rendering test, and you seem to be feeding with input that should not be possible anymore (after this patch).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150683/new/
https://reviews.llvm.org/D150683
More information about the cfe-commits
mailing list