[clang-tools-extra] [clangd] Do not show `aParam` parameter hint for argument spelled `param` (PR #119162)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 15 01:53:46 PST 2024
================
@@ -867,13 +867,28 @@ class InlayHintVisitor : public RecursiveASTVisitor<InlayHintVisitor> {
}
}
+ static bool argumentMatchesParamName(StringRef ArgName, StringRef ParamName) {
+ // Exact match.
+ if (ParamName == ArgName)
+ return true;
+
+ // Parameter name uses "a" prefix (e.g. "aParam").
+ if (ParamName.size() > 1 && ParamName[0] == 'a' &&
----------------
JVApen wrote:
I might be complicating things, though shouldn't this also cover `anApple`
https://github.com/llvm/llvm-project/pull/119162
More information about the cfe-commits
mailing list