[PATCH] D64924: [LibTooling] Add function to translate and validate source range for editing

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 18 09:47:50 PDT 2019


ymandel marked 2 inline comments as done.
ymandel added inline comments.


================
Comment at: clang/include/clang/Tooling/Refactoring/SourceCode.h:80
+llvm::Optional<CharSourceRange>
+getRangeForEdit(const CharSourceRange &EditRange, const ASTContext &Context);
 } // namespace tooling
----------------
ilya-biryukov wrote:
> NIT: I can see why passing two structs instead of a single `ASTContext` is annoying, but still suggest adding an overload that accepts a `SourceManager` and `LangOptions`.
> (The current overload would trivially call into the other one).
> 
> The reason is that `ASTContext` is not available where you would need this function. 
> In any case, having the `ASTContext` overload is convenient.
good point!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64924





More information about the cfe-commits mailing list