[clang] 6c683aa - [libTooling] Fix breakage from change #84922
Yitzhak Mandelbaum via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 6 08:31:55 PST 2019
Author: Yitzhak Mandelbaum
Date: 2019-11-06T11:31:35-05:00
New Revision: 6c683aa8d7d9dcda30b2a9eb42b43cbce5c645b8
URL: https://github.com/llvm/llvm-project/commit/6c683aa8d7d9dcda30b2a9eb42b43cbce5c645b8
DIFF: https://github.com/llvm/llvm-project/commit/6c683aa8d7d9dcda30b2a9eb42b43cbce5c645b8.diff
LOG: [libTooling] Fix breakage from change #84922
Added:
Modified:
clang/lib/Tooling/Transformer/RewriteRule.cpp
clang/unittests/Tooling/TransformerTest.cpp
Removed:
################################################################################
diff --git a/clang/lib/Tooling/Transformer/RewriteRule.cpp b/clang/lib/Tooling/Transformer/RewriteRule.cpp
index 6fa558f7b2ee..b96b5eeabad0 100644
--- a/clang/lib/Tooling/Transformer/RewriteRule.cpp
+++ b/clang/lib/Tooling/Transformer/RewriteRule.cpp
@@ -54,7 +54,7 @@ transformer::detail::translateEdits(const MatchResult &Result,
return Transformations;
}
-ASTEdit transformer::change(RangeSelector S, TextGenerator Replacement) {
+ASTEdit transformer::changeTo(RangeSelector S, TextGenerator Replacement) {
ASTEdit E;
E.TargetRange = std::move(S);
E.Replacement = std::move(Replacement);
diff --git a/clang/unittests/Tooling/TransformerTest.cpp b/clang/unittests/Tooling/TransformerTest.cpp
index ddfa00187d2c..c99bf974f88e 100644
--- a/clang/unittests/Tooling/TransformerTest.cpp
+++ b/clang/unittests/Tooling/TransformerTest.cpp
@@ -8,8 +8,9 @@
#include "clang/Tooling/Transformer/Transformer.h"
#include "clang/ASTMatchers/ASTMatchers.h"
-#include "clang/Tooling/Transformer/RangeSelector.h"
#include "clang/Tooling/Tooling.h"
+#include "clang/Tooling/Transformer/RangeSelector.h"
+#include "clang/Tooling/Transformer/Stencil.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "gmock/gmock.h"
@@ -20,6 +21,8 @@ using namespace tooling;
using namespace ast_matchers;
namespace {
using ::testing::IsEmpty;
+using transformer::cat;
+using transformer::changeTo;
using transformer::RewriteRule;
constexpr char KHeaderContents[] = R"cc(
More information about the cfe-commits
mailing list