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

Issue 2252853002: Replace clang::tooling::Replacements with std::set<clang::tooling::Replacement>. (Closed)

Created:
4 years, 4 months ago by Łukasz Anforowicz
Modified:
4 years, 4 months ago
Reviewers:
dcheng
CC:
chromium-reviews, Nico
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace 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)
Łukasz Anforowicz
dcheng@, PTAL? I guess the rewrite tool is not part of CQ and this is ...
4 years, 4 months ago (2016-08-16 21:24:35 UTC) #2
Łukasz Anforowicz
dcheng@ - in patchset #3 the tools/clang/rewrite_to_chrome_style/tests are green. Can you take a look please? ...
4 years, 4 months ago (2016-08-16 22:24:16 UTC) #3
dcheng
LGTM. We might still want to use the clang tooling thing as some point, but ...
4 years, 4 months ago (2016-08-16 23:04:44 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2252853002/60001
4 years, 4 months ago (2016-08-16 23:06:58 UTC) #7
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-16 23:45:55 UTC) #9
commit-bot: I haz the power
4 years, 4 months ago (2016-08-16 23:48:36 UTC) #11
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e88f48501ee8744d8b0b39995b61fcb12cd304a8
Cr-Commit-Position: refs/heads/master@{#412379}

Powered by Google App Engine
This is Rietveld 408576698