kadircet added inline comments.

================
Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:186
+    if (PVD->hasDefaultArg()) {
+      auto DelRange = 
CharSourceRange::getTokenRange(PVD->getDefaultArgRange());
+      auto StartLoc = PVD->getLocation();
----------------
hokein wrote:
> just curious what's the `getDefaultArgRange` for case like `void foo(int a = 
> 5)`, is it just `[[5]]`?
yes it is the range of the initializer.


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:191
+      // it.
+      if (!PVD->getDeclName().isEmpty())
+        StartLoc =
----------------
hokein wrote:
> The approach seems fail on the following case,  StartLoc will point to `Foo`.
> 
> ```
>  class Bar { void func(int); };
>  void bind(const char*, void(Bar::*Foo)(int) = nullptr)
> ```
ah, right. switching to a similar strategy as D71188 to find first `=` before 
initializer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71187



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to