[PATCH] D141226: [clangd] support expanding `decltype(expr)`

Sam McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 10:58:53 PST 2023


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExpandDeducedType.cpp:151
+
+  // We shouldn't replace types like function and array, the commonality between
+  // these cases is that they use C-style declarator syntax that may have chunks
----------------
sammccall wrote:
> Say why rather than what, e.g.
> 
> ```
> Some types aren't written as single chunks of text, e.g:
>   auto fptr = &func; // auto is void(*)()
> ==>
>   void (*fptr)();
> 
> Replacing these requires examining the declarator, we don't support it yet.
> ```
oops, that should be `void (*fptr)() = &func;` of course..


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141226



More information about the llvm-commits mailing list