There's no reason that arguments to e.g. lambda calls should be treated
differently than those to "real" functions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for the patch!
nit: please make the commit message a bit more specific, e.g. "Also apply the 'mutable' semantic token modifier to arguments of overloaded call operators"
clang-tools-extra/clangd/SemanticHighlighting.cpp | ||
---|---|---|
539–540 | Please update the FIXME to something like: // FIXME: consider highlighting parameters of some other overloaded operators as well (There's some discussion here about which other cases would make sense to highlight, and which wouldn't.) | |
540–547 | I think this could be expressed a bit more cleanly with the ArrayRef API: (Please note also the convention in this codebase to capitalize local variable names.) llvm::ArrayRef<const Expr *const> Args = {E->getArgs(), E->getNumArgs()}; if (const auto CallOp = ...) { if (CallOp->getOperator() != OO_Call) return true; Args = Args.drop_front(); // Drop object parameter } highlightMutableReferenceArguments(..., Args); |
Thanks!
I'm going to take the liberty of approving this, as it seems straightforward and unlikely to be contentious in any way.
Please let me know if you need me to commit it.
Please update the FIXME to something like:
(There's some discussion here about which other cases would make sense to highlight, and which wouldn't.)