Bug 174930

Summary: Using "auto <function()> -> returnType" breaks prepare-ChangeLog
Product: WebKit Reporter: JF Bastien <jfbastien>
Component: Tools / TestsAssignee: JF Bastien <jfbastien>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, buildbot, commit-queue, dbates, jbedard, jfbastien, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
dbates: review-, dbates: commit-queue-
patch none

Description JF Bastien 2017-07-27 23:33:38 PDT
From Brady:

I just noticed this tonight. When a change is made to one of these functions, prepare-ChangeLog doesn't log the functions that changed.

I have a question and a request.

Question:

The functions in question where I noticed this:
auto WebURLSchemeTask::didComplete(const ResourceError& error) -> ExceptionType

Would normally be written as:
WebURLSchemeTask::ExceptionType WebURLSchemeTask::didComplete(const ResourceError& error)

Is there some actual value to using this syntax other than… being syntactically different, and being just a little shorter?

Request:

Until we fix prepare-ChangeLog, and unless there is some great advantage to this syntax that I'm not aware of… it's hold off on using it more.
Comment 1 JF Bastien 2017-07-27 23:35:18 PDT
Created attachment 316624 [details]
patch

Pardon my perl.
Comment 2 Daniel Bates 2017-07-28 02:42:38 PDT
We have unit tests for this code. Please add a unit test to <https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp> and update the expected result in <https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt>. You can run the unit tests using the script Tools/Scripts/test-webkitperl.
Comment 3 JF Bastien 2017-07-28 09:40:48 PDT
Created attachment 316644 [details]
patch

(In reply to Daniel Bates from comment #2)
> We have unit tests for this code. Please add a unit test to

"unit tests"? What are those? ;-)

While I'm here, I also added const and volatile overloads.
Comment 4 Build Bot 2017-07-28 09:42:43 PDT
Attachment 316644 [details] did not pass style-queue:


ERROR: Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp:396:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp:420:  This { should be at the end of the previous line  [whitespace/braces] [4]
ERROR: Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp:425:  This { should be at the end of the previous line  [whitespace/braces] [4]
Total errors found: 3 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 WebKit Commit Bot 2017-07-28 11:54:37 PDT
Comment on attachment 316644 [details]
patch

Clearing flags on attachment: 316644

Committed r220010: <http://trac.webkit.org/changeset/220010>
Comment 6 WebKit Commit Bot 2017-07-28 11:54:38 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-07-28 12:38:53 PDT
<rdar://problem/33596121>
Comment 8 Jonathan Bedard 2017-07-28 15:04:04 PDT
Committed r220017: <http://trac.webkit.org/changeset/220017>