SureYeaah added inline comments.

================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:214
+    bool IsConst;
+    Parameter(std::string Name, std::string Type, bool IsConst)
+        : Name(Name), Type(Type), IsConst(IsConst) {}
----------------
sammccall wrote:
> I'd suggest capturing the type as a QualType instead of a string + const + 
> ref flag
> 
> When types may need to be re-spelled, we'll need that extra information - the 
> context needed to re-spell is available at render() time, not addParameter() 
> time.
Const will also depend on CapturedSourceInfo. So I'm passing QualType instead 
of the name as string.


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:360
+
+CapturedSourceInfo::DeclInformation &
+CapturedSourceInfo::getDeclInformationFor(const Decl *D) {
----------------
kadircet wrote:
> why not move this and 4 following functions into astvisitor?
Because we would need to pass CapturedSourceInfo and ExtractionZone to the 
Visitor then?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65526



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

Reply via email to