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

Issue 397323002: Remove Clang-on-Win fix for definitions of Color's static data members (Closed)

Created:
6 years, 5 months ago by hans
Modified:
6 years, 5 months ago
Reviewers:
Nico
CC:
blink-reviews, jamesr, krit, jbroman, danakj, Rik, Stephen Chennney, pdr., rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Remove Clang-on-Win fix for definitions of Color's static data members Clang does treat the in-class initialization as a definition, just like MSVC. The problem was that Clang failed to emit the definition unless it was referenced, which broke the components build. This has been fixed in Clang r213304. The work-around was added in Blink r176469, and this patch effectively removes that. BUG=82385 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178401

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M Source/platform/graphics/Color.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
hans
Please take a look.
6 years, 5 months ago (2014-07-17 20:37:23 UTC) #1
Nico
lgtm! (maybe say "effectively reverts 176469" somewhere)
6 years, 5 months ago (2014-07-17 20:43:16 UTC) #2
hans
On 2014/07/17 20:43:16, Nico (away) wrote: > lgtm! > > (maybe say "effectively reverts 176469" ...
6 years, 5 months ago (2014-07-17 20:44:43 UTC) #3
hans
The CQ bit was checked by hans@chromium.org
6 years, 5 months ago (2014-07-17 20:44:45 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hans@chromium.org/397323002/1
6 years, 5 months ago (2014-07-17 20:45:29 UTC) #5
commit-bot: I haz the power
Change committed as 178401
6 years, 5 months ago (2014-07-17 22:42:42 UTC) #6
Peter Kasting
(1) Instead of having an #if block here, consider using the STATIC_CONST_MEMBER_DEFINITION macro, which makes ...
6 years, 5 months ago (2014-07-17 22:58:27 UTC) #7
Nico
Note that this is a revert; see discussion on https://codereview.chromium.org/330823006 why it was necessary (clang-cl ...
6 years, 5 months ago (2014-07-17 23:06:15 UTC) #8
hans
6 years, 5 months ago (2014-07-17 23:31:27 UTC) #9
Message was sent while issue was closed.
On 2014/07/17 22:58:27, Peter Kasting wrote:
> (2) I thought the C++ standard says compilers are not supposed to emit
> definitions automatically, whether a constant is referenced or not?
> For constants whose addresses are not taken, the declaration (i.e. the
assignment in
> the class declaration) should be sufficient, and no definition should be
emitted
> or needed.  For constants whose addresses are taken, one is supposed to
> explicitly provide a definition, as Color.cpp is doing.

Right, but MSVC doesn't follow the standard in this respect, which is why we
have this #ifdef. At least with my patch, we don't have to work-around the
work-around for Clang on Windows.

Powered by Google App Engine
This is Rietveld 408576698