]> granicus.if.org Git - clang/commit
Add functions to apply replacements and reformat them.
authorManuel Klimek <klimek@google.com>
Tue, 1 Mar 2016 12:37:30 +0000 (12:37 +0000)
committerManuel Klimek <klimek@google.com>
Tue, 1 Mar 2016 12:37:30 +0000 (12:37 +0000)
commite30483a5c54cae335d9d5b9461cb8753e4d1a57f
treeb2250a31faef9f35b81e316d6d1cf73e9ba6f0a4
parentb10c37f2ae78c324308eb42b1207f76eaf8d1ba7
Add functions to apply replacements and reformat them.

This is a commonly useful feature to have, and we have implemented it
multiple times with different kinds of bugs. This implementation
centralizes the idea in a set of functions that we can then use from the various
tools.

Reverts r262234, which is a revert of r262232, and puts the functions
into FOrmat.h, as they are closely coupled to clang-format, and we
otherwise introduce a cyclic dependency between libFormat and
libTooling.

Patch by Eric Liu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262323 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Format/Format.h
include/clang/Tooling/Core/Replacement.h
lib/Format/Format.cpp
lib/Tooling/Core/Replacement.cpp
unittests/Format/CMakeLists.txt
unittests/Format/FormatTest.cpp
unittests/Tooling/RefactoringTest.cpp