[PATCH] clang-apply-replacements: Add code-formatting post processing step

Edwin Vane edwin.vane at intel.com
Thu Sep 19 15:23:28 PDT 2013


Hi tareqsiraj, arielbernal, Sarcasm, klimek,

Updated libclangApplyReplacements interface with two new functions:
* calculateChangedRanges()
* reformatRanges()
which are used to do code formatting on a single file.
clang-apply-replacements uses these functions to apply code formatting
after applying replacements when the new -format-style option is used.

http://llvm-reviews.chandlerc.com/D1730

Files:
  clang-apply-replacements/CMakeLists.txt
  clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h
  clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
  clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
  test/clang-apply-replacements/Inputs/format/no.cpp
  test/clang-apply-replacements/Inputs/format/no.yaml
  test/clang-apply-replacements/Inputs/format/yes.cpp
  test/clang-apply-replacements/Inputs/format/yes.yaml
  test/clang-apply-replacements/format.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1730.1.patch
Type: text/x-patch
Size: 18942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130919/2013b2b2/attachment.bin>


More information about the cfe-commits mailing list