[PATCH] D39441: [refactor][extract] insert semicolons into extracted/inserted code when needed

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 2 01:25:42 PDT 2017


ioeric added a comment.

Code looks good with some nits.



================
Comment at: lib/Tooling/Refactoring/CMakeLists.txt:7
   AtomicChange.cpp
   Extract.cpp
+  SourceExtraction.cpp
----------------
Shall we move function extraction sources into a sub-directory? Like what you did for headers.


================
Comment at: lib/Tooling/Refactoring/SourceExtraction.h:25
+/// Determines which semicolons should be inserted during extraction.
+struct ExtractionSemicolonPolicy {
+  bool IsNeededInExtractedFunction;
----------------
I think this should be a `class` with accessors if the members are not expected to be changed by users.


================
Comment at: lib/Tooling/Refactoring/SourceExtraction.h:36
+
+private:
+  static ExtractionSemicolonPolicy neededInExtractedFunction() {
----------------
Either move these helpers into the cpp file or simply make them public.


Repository:
  rL LLVM

https://reviews.llvm.org/D39441





More information about the cfe-commits mailing list