New issue
Advanced search Search tips

Issue 598140 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 578344



Sign in to add a comment

rewrite_to_chrome_style: UnresolvedLookupExpr rewrite is clobbering nested name specifiers

Project Member Reported by dcheng@chromium.org, Mar 26 2016

Issue description

A trial run shows that UnresolvedLookupExprs are probably rewriting the wrong thing. An example fixup patch needed after running the tool across WTF:

 template<size_t inlineCapacity>
 String::String(const Vector<UChar, inlineCapacity>& vector)
-    : impl_(vector.Size() ? Create::Create(vector.Data(), vector.Size()) : StringImpl::Empty())
+    : impl_(vector.Size() ? StringImpl::Create(vector.Data(), vector.Size()) : StringImpl::Empty())
 {
 }
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/663008c70f0e5d9bfc95db70aa703432847f23ad

commit 663008c70f0e5d9bfc95db70aa703432847f23ad
Author: dcheng <dcheng@chromium.org>
Date: Mon Mar 28 20:36:44 2016

rewrite_to_chrome_style: improve template rewrite handling

- Handles UnresolvedMemberExprs to rewrite unresolved references to
  methods in a member context.
- Use the correct SourceLocation when rewriting UnresolvedLookupExprs
  to avoid clobbering nested name specifiers.

BUG= 598140 , 598142 
R=danakj@chromium.org

Review URL: https://codereview.chromium.org/1838713002

Cr-Commit-Position: refs/heads/master@{#383554}

[modify] https://crrev.com/663008c70f0e5d9bfc95db70aa703432847f23ad/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
[modify] https://crrev.com/663008c70f0e5d9bfc95db70aa703432847f23ad/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc
[modify] https://crrev.com/663008c70f0e5d9bfc95db70aa703432847f23ad/tools/clang/rewrite_to_chrome_style/tests/template-original.cc

Comment 2 by dcheng@chromium.org, Mar 28 2016

Status: Fixed (was: Assigned)

Sign in to add a comment