[PATCH] D94942: [clangd] Add tweak for implementing abstract class

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 31 08:18:35 PDT 2022


sammccall added a comment.
Herald added a project: All.

@njames93 I had completely forgotten about this when I attempted the same thing early this year.
I never finished it but wanted to share what I had in case it's useful: http://reviews.llvm.org/D122827. Also happy to finish that sometime if you're not keen on completing this.

Some thoughts based on that:

- I think it's worth handling both "implement pure-virtuals" and "override virtuals" as the same tweak, choosing based on context. >90% of the work is the same. (I think my patch gets detection wrong though).
- we now have a library to pick insertion points in a class a bit more declaratively
- I think you can use getFinalOverriders to avoid a lot of work traversing class hierarchies
- if you're not using getReturnType().print(..., /*Placeholder=*/Declarator) then functions-that-return-function-pointers will definitely be rendered wrong :-)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94942/new/

https://reviews.llvm.org/D94942



More information about the cfe-commits mailing list