WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
171010
Vector.h: error: 'auto' not allowed in lambda parameter
https://bugs.webkit.org/show_bug.cgi?id=171010
Summary
Vector.h: error: 'auto' not allowed in lambda parameter
David Kilzer (:ddkilzer)
Reported
2017-04-19 14:32:26 PDT
In file included from $(INSTALL_ROOT)/System/Library/Frameworks/WebKit.framework/PrivateHeaders/EnvironmentUtilities.h:29: In file included from $(SDKROOT)/usr/local/include/wtf/text/WTFString.h:30: In file included from $(SDKROOT)/usr/local/include/wtf/text/StringImpl.h:35: $(SDKROOT)/usr/local/include/wtf/Vector.h:1526:47: error: 'auto' not allowed in lambda parameter return removeRepeatedElements(vector, [] (auto& a, auto& b) { return a == b; }); ^~~~ $(SDKROOT)/usr/local/include/wtf/Vector.h:1526:56: error: 'auto' not allowed in lambda parameter return removeRepeatedElements(vector, [] (auto& a, auto& b) { return a == b; }); ^~~~ 2 errors generated. This code was committed in
Bug 170102
, but was triggered by a change in
Bug 170994
that exposed EnvironmentUtilities.h as a private header in WebKit.framework.
Attachments
Patch
(1.48 KB, patch)
2017-04-19 14:38 PDT
,
David Kilzer (:ddkilzer)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2017-04-19 14:32:35 PDT
<
rdar://problem/31716076
>
David Kilzer (:ddkilzer)
Comment 2
2017-04-19 14:38:50 PDT
Created
attachment 307509
[details]
Patch
Build Bot
Comment 3
2017-04-19 14:39:55 PDT
Attachment 307509
[details]
did not pass style-queue: ERROR: Source/WTF/wtf/Vector.h:1526: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Saam Barati
Comment 4
2017-04-19 14:45:10 PDT
Comment on
attachment 307509
[details]
Patch r=me
WebKit Commit Bot
Comment 5
2017-04-19 16:21:23 PDT
Comment on
attachment 307509
[details]
Patch Clearing flags on attachment: 307509 Committed
r215538
: <
http://trac.webkit.org/changeset/215538
>
WebKit Commit Bot
Comment 6
2017-04-19 16:21:25 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 7
2017-04-19 16:33:49 PDT
Comment on
attachment 307509
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=307509&action=review
> Source/WTF/ChangeLog:3 > + Vector.h: error: 'auto' not allowed in lambda parameter
It is allowed with c++14. The issue is that the project in question is building with c++11 support instead of c++14. I think we should fix this instead.
Chris Dumez
Comment 8
2017-04-19 16:36:14 PDT
Comment on
attachment 307509
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=307509&action=review
>> Source/WTF/ChangeLog:3 >> + Vector.h: error: 'auto' not allowed in lambda parameter > > It is allowed with c++14. The issue is that the project in question is building with c++11 support instead of c++14. I think we should fix this instead.
Source/WebKit/mac/Configurations/WebKitLegacy.xcconfig:OTHER_TAPI_FLAGS[sdk=iphone*] = -x objective-c++ -std=c++11 -fno-rtti; We likely want c++14 here.
Brent Fulgham
Comment 9
2017-04-19 16:44:30 PDT
Comment on
attachment 307509
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=307509&action=review
>>> Source/WTF/ChangeLog:3 >>> + Vector.h: error: 'auto' not allowed in lambda parameter >> >> It is allowed with c++14. The issue is that the project in question is building with c++11 support instead of c++14. I think we should fix this instead. > > Source/WebKit/mac/Configurations/WebKitLegacy.xcconfig:OTHER_TAPI_FLAGS[sdk=iphone*] = -x objective-c++ -std=c++11 -fno-rtti; > > We likely want c++14 here.
I think this also broke the Windows build, so we may want to be careful.
Chris Dumez
Comment 10
2017-04-20 12:32:41 PDT
Can we roll this out after
https://trac.webkit.org/changeset/215560/webkit
?
Brent Fulgham
Comment 11
2017-04-20 12:37:40 PDT
(In reply to Chris Dumez from
comment #10
)
> Can we roll this out after
https://trac.webkit.org/changeset/215560/webkit
?
It also breaks Windows, so I don't think so.
Brent Fulgham
Comment 12
2017-04-21 09:23:49 PDT
(In reply to Chris Dumez from
comment #10
)
> Can we roll this out after
https://trac.webkit.org/changeset/215560/webkit
?
I think we can roll this workaround out once we update our Windows build infrastructure to Visual Studio 2017.
Brent Fulgham
Comment 13
2017-04-21 10:30:57 PDT
(In reply to Brent Fulgham from
comment #12
)
> (In reply to Chris Dumez from
comment #10
) > > Can we roll this out after
https://trac.webkit.org/changeset/215560/webkit
? > > I think we can roll this workaround out once we update our Windows build > infrastructure to Visual Studio 2017.
I'm wrong! I just rolled this patch out locally, and was able to build WebKit without trouble on Windows. So it looks like VS2015 Update 3's C++14 support is sufficient here.
David Kilzer (:ddkilzer)
Comment 14
2017-04-23 15:58:53 PDT
(In reply to Brent Fulgham from
comment #13
)
> (In reply to Brent Fulgham from
comment #12
) > > (In reply to Chris Dumez from
comment #10
) > > > Can we roll this out after
https://trac.webkit.org/changeset/215560/webkit
? > > > > I think we can roll this workaround out once we update our Windows build > > infrastructure to Visual Studio 2017. > > I'm wrong! > > I just rolled this patch out locally, and was able to build WebKit without > trouble on Windows. So it looks like VS2015 Update 3's C++14 support is > sufficient here.
Based on Source/WebKit2/Configurations/Base.xcconfig, we can't roll out this change until we switch to c++14 (or gnu++14) for this: OTHER_TAPI_FLAGS[sdk=iphone*] = -x objective-c++ -std=c++11 -fno-rtti;
Alexey Proskuryakov
Comment 15
2017-04-23 22:58:34 PDT
Ideally, we would not make any C++ headers WebKit SPI, and then we won't need to worry about InstallAPI here.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug