DescriptionReplace clang::tooling::Replacements with std::set<clang::tooling::Replacement>.
Most recent clang roll brought in
https://github.com/llvm-mirror/clang/commit/85c0fa18d965d4ed91e037a085e4c20bcea7e27f
which changed clang::tooling::Replacements from being a type alias for
std::set<Replacement> to being a standalone class. This means that there is no
Replacements::emplace anymore.
In theory calls to Replacements::emplace could be replaced with
calls to Replacements::add, but in practice the add call fails with:
1) All replacements must have the same file path. New replacement:
../../third_party/WebKit/Source/wtf/TypeTraits.h, existing
replacements: ../../third_party/WebKit/Source/wtf/Assertions.h
or
2) New replacement:
.../tools/clang/rewrite_to_chrome_style/tests/methods-actual.cc:
2635:+5:"ptr_" conflicts with existing replacement:
.../tools/clang/rewrite_to_chrome_style/tests/methods-actual.cc:
2635:+5:"ptr_"
So - the easiest fix seems to be to just directly use
std::set<clang::tooling::Replacement>.
BUG=
Committed: https://crrev.com/e88f48501ee8744d8b0b39995b61fcb12cd304a8
Cr-Commit-Position: refs/heads/master@{#412379}
Patch Set 1 #Patch Set 2 : More tweaks required to make the tool work with newer clang. #Patch Set 3 : Revert unneeded changes. #
Total comments: 3
Patch Set 4 : Even works with Blink code now... #Messages
Total messages: 11 (5 generated)
|