[PATCH] D73723: [clangd][Hover] Handle uninstantiated default args
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 31 05:18:50 PST 2020
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: clang-tools-extra/clangd/Hover.cpp:276
+ // we only print the expression.
+ if (PVD->hasDefaultArg() && !PVD->hasUnparsedDefaultArg()) {
P.Default.emplace();
----------------
NIT: maybe move this into a helper function?
```
Expr* getDefaultArgForPresentation(ParmVarDecl*);
```
I imagine this could be useful in other contexts too.
PS: As usual, naming is not my strong side.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73723/new/
https://reviews.llvm.org/D73723
More information about the cfe-commits
mailing list