Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp

Issue 2252853002: Replace clang::tooling::Replacements with std::set<clang::tooling::Replacement>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Even works with Blink code now... Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
diff --git a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
index 9ae3201a4c2b0964141b30d3207de19373c716b6..dddccd1741bb968b0c99fec10af2bda8a3a5ec5a 100644
--- a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
+++ b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
@@ -43,7 +43,6 @@
using namespace clang::ast_matchers;
using clang::tooling::CommonOptionsParser;
using clang::tooling::Replacement;
-using clang::tooling::Replacements;
using llvm::StringRef;
namespace {
@@ -491,7 +490,7 @@ struct TargetNodeTraits<clang::UnresolvedMemberExpr> {
template <typename DeclNode, typename TargetNode>
class RewriterBase : public MatchFinder::MatchCallback {
public:
- explicit RewriterBase(Replacements* replacements)
+ explicit RewriterBase(std::set<Replacement>* replacements)
: replacements_(replacements) {}
void run(const MatchFinder::MatchResult& result) override {
@@ -533,7 +532,7 @@ class RewriterBase : public MatchFinder::MatchCallback {
}
private:
- Replacements* const replacements_;
+ std::set<Replacement>* const replacements_;
std::unordered_map<std::string, std::string> replacement_names_;
};
@@ -583,7 +582,7 @@ int main(int argc, const char* argv[]) {
options.getSourcePathList());
MatchFinder match_finder;
- Replacements replacements;
+ std::set<Replacement> replacements;
auto in_blink_namespace =
decl(hasAncestor(namespaceDecl(anyOf(hasName("blink"), hasName("WTF")),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698