Can't default initialize const object with xcode-clang. |
||||||||||||
Issue descriptionCan'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.
,
Jul 28 2016
,
Jul 28 2016
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?
,
Jul 28 2016
Yes, that sounds like a good suggestion. I can probably do that today.
,
Jul 28 2016
CL in progress: https://codereview.chromium.org/2184353003/
,
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
,
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.
,
Aug 8 2016
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.
,
Nov 2 2016
,
Feb 22 2017
,
Feb 22 2017
Did we upgraded to an Xcode with the fix?
,
Feb 22 2017
I thought so, but nope: https://codereview.chromium.org/2710823004/ Changing status to ExternalDependency
,
Apr 13 2017
,
Apr 13 2017
,
Apr 20 2018
Did we upgraded to an Xcode with the fix?
,
Apr 20 2018
This seems to work fine now: https://chromium-review.googlesource.com/c/chromium/src/+/1021593
,
Apr 20 2018
,
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 |
||||||||||||
Comment 1 by jif@chromium.org
, Jul 28 2016For 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; ^ {}