New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 632330 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug

Blocked on:
issue 661612



Sign in to add a comment

Can't default initialize const object with xcode-clang.

Project Member Reported by jif@chromium.org, Jul 28 2016

Issue description

Can't default initialize const object with xcode-clang.

Bug has been fixed (https://llvm.org/bugs/show_bug.cgi?id=23381), but xcode (which is used to build Chrome iOS) uses an older version of clang which does not contain the fix.
 

Comment 1 by jif@chromium.org, Jul 28 2016

Cc: dpranke@chromium.org sdefresne@chromium.org
For the record, the errors are:

../../base/sequence_token_unittest.cc:17:23: error: default initialization of an object of const type 'const base::SequenceToken' without a user-provided default constructor
  const SequenceToken invalid_a;
                      ^
                               {}
../../base/sequence_token_unittest.cc:18:23: error: default initialization of an object of const type 'const base::SequenceToken' without a user-provided default constructor
  const SequenceToken invalid_b;
                      ^
                               {}
../../base/sequence_token_unittest.cc:34:23: error: default initialization of an object of const type 'const base::SequenceToken' without a user-provided default constructor
  const SequenceToken invalid_a;
                      ^
                               {}
../../base/sequence_token_unittest.cc:35:23: error: default initialization of an object of const type 'const base::SequenceToken' without a user-provided default constructor
  const SequenceToken invalid_b;
                      ^
                               {}
Cc: thakis@chromium.org
Cc: pinkerton@chromium.org justincohen@chromium.org rohitrao@chromium.org
Labels: -Pri-3 M-54 Pri-2
Since we are soon turning down two gyp builder (from four iOS builders corresponding to the product {device, simulator} x {gyp, gn}), can we repurpose one of those two builders to use clang's Xcode?

This would allow catching those errors in the upstream tree instead of waiting for the roll (given that we still want to build with Xcode version of clang for official build, we have to support that configuration). Dirk/Thakis WDYT? 
Yes, that sounds like a good suggestion. I can probably do that today.

Comment 5 by jif@chromium.org, Jul 28 2016

CL in progress: https://codereview.chromium.org/2184353003/
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 29 2016

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

commit 0240044e435a3708d3f082771943a498a4cf3592
Author: jif <jif@chromium.org>
Date: Thu Jul 28 23:57:06 2016

Explicitly call SequenceToken's default constructor.

This CL is to workaround a clang bug occurring when building
sequence_token_unittest.cc for Chrome iOS.

BUG= 632330 

Review-Url: https://codereview.chromium.org/2184353003
Cr-Commit-Position: refs/heads/master@{#408515}

[modify] https://crrev.com/0240044e435a3708d3f082771943a498a4cf3592/base/sequence_token_unittest.cc

Comment 7 by thakis@chromium.org, Jul 29 2016

(fwiw i taught clang about this in http://llvm.org/viewvc/llvm-project?view=revision&revision=261297 (and http://llvm.org/viewvc/llvm-project?view=revision&revision=261770). Once Xcode's clang has these changes, this particular thing will work.

It'd be cool if we could investigate using "our" clang for ios prod builds.
Cc: dmaclach@chromium.org
Perhaps we should submit a tot clang build to testflight to test.

I spoke to dmac@ this past week and he expressed an interest as well.
Blockedon: 661612

Comment 10 by jif@chromium.org, Feb 22 2017

Status: Fixed (was: Started)
Did we upgraded to an Xcode with the fix?

Comment 12 by jif@chromium.org, Feb 22 2017

Status: ExternalDependency (was: Fixed)
I thought so, but nope: https://codereview.chromium.org/2710823004/
Changing status to ExternalDependency
Labels: Hotlist-Needs-New-Component
Components: Build
Labels: -Hotlist-Needs-New-Component
Owner: justincohen@chromium.org
Did we upgraded to an Xcode with the fix?
Status: Started (was: ExternalDependency)
This seems to work fine now: https://chromium-review.googlesource.com/c/chromium/src/+/1021593


Status: Fixed (was: Started)
Project Member

Comment 18 by bugdroid1@chromium.org, Apr 20 2018

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

commit c2b52c5a1ef2709e75af2dd23c0852646edebc52
Author: Justin Cohen <justincohen@google.com>
Date: Fri Apr 20 17:09:52 2018

Revert of Explicitly call SequenceToken's default constructor.

Reason for revert:
xcode's clang now supports const default initialization.

Original issue's description:
> Explicitly call SequenceToken's default constructor.
>
> This CL is to workaround a clang bug occurring when building
> sequence_token_unittest.cc for Chrome iOS.
>
> BUG= 632330 
>
> Committed: https://crrev.com/0240044e435a3708d3f082771943a498a4cf3592
> Cr-Commit-Position: refs/heads/master@{#408515}

BUG:  632330 
Change-Id: Ic4fafd8d9ee302056682091bfab2c929aa30072f
Reviewed-on: https://chromium-review.googlesource.com/1021593
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552362}
[modify] https://crrev.com/c2b52c5a1ef2709e75af2dd23c0852646edebc52/base/sequence_token_unittest.cc

Sign in to add a comment