]> granicus.if.org Git - clang/commit
Implement tooling::Replacements as a class.
authorEric Liu <ioeric@google.com>
Mon, 1 Aug 2016 10:16:37 +0000 (10:16 +0000)
committerEric Liu <ioeric@google.com>
Mon, 1 Aug 2016 10:16:37 +0000 (10:16 +0000)
commit85c0fa18d965d4ed91e037a085e4c20bcea7e27f
treec01feb771ce1fadf36ee0e2473b001d3405458bd
parent1505139f741e601408dc4aaddf8e352d28085f00
Implement tooling::Replacements as a class.

Summary:
- Implement clang::tooling::Replacements as a class to provide interfaces to
  control how replacements for a single file are combined and provide guarantee
  on the order of replacements being applied.
- tooling::Replacements only contains replacements for the same file now.
  Use std::map<std::string, tooling::Replacements> to represent multi-file
  replacements.
- Error handling for the interface change will be improved in followup patches.

Reviewers: djasper, klimek

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D21748

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277335 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
include/clang/Tooling/Core/Replacement.h
include/clang/Tooling/Refactoring.h
lib/Format/Format.cpp
lib/Format/SortJavaScriptImports.cpp
lib/Format/TokenAnalyzer.cpp
lib/Format/WhitespaceManager.cpp
lib/Tooling/Core/Replacement.cpp
lib/Tooling/Refactoring.cpp
lib/Tooling/RefactoringCallbacks.cpp
tools/clang-format/ClangFormat.cpp
unittests/Format/CleanupTest.cpp
unittests/Format/FormatTest.cpp
unittests/Tooling/RefactoringTest.cpp
unittests/Tooling/ReplacementTest.h [new file with mode: 0644]
unittests/Tooling/RewriterTest.cpp