From 4c1ef97adb1ecdc4ed3ee4a9ee7d5546aecda014 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Tue, 29 Mar 2016 16:31:53 +0000 Subject: Added formatAndApplyAllReplacements that works on multiple files in libTooling. Summary: formatAndApplyAllReplacements takes a set of Replacements, applies them on a Rewriter, and reformats the changed code. Reviewers: klimek, djasper Subscribers: ioeric, klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D17852 llvm-svn: 264745 --- clang/unittests/Format/FormatTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/unittests/Format/FormatTest.cpp') diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 0adade0b0a8..8f63cbe3232 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -11270,7 +11270,8 @@ TEST_F(ReplacementTest, FormatCodeAfterReplacements) { format::FormatStyle Style = format::getLLVMStyle(); Style.ColumnLimit = 20; // Set column limit to 20 to increase readibility. - EXPECT_EQ(Expected, applyAllReplacementsAndFormat(Code, Replaces, Style)); + EXPECT_EQ(Expected, applyAllReplacements( + Code, formatReplacements(Code, Replaces, Style))); } } // end namespace -- cgit v1.2.3