hokein 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(); ---------------- just curious what's the `getDefaultArgRange` for case like `void foo(int a = 5)`, is it just `[[5]]`? ================ Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:191 + // it. + if (!PVD->getDeclName().isEmpty()) + StartLoc = ---------------- 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) ``` 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