Bug 174930 - Using "auto <function()> -> returnType" breaks prepare-ChangeLog
Summary: Using "auto <function()> -> returnType" breaks prepare-ChangeLog
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: JF Bastien
Keywords: InRadar
Depends on:
Reported: 2017-07-27 23:33 PDT by JF Bastien
Modified: 2017-07-28 15:04 PDT (History)
8 users (show)

See Also:

patch (1.54 KB, patch)
2017-07-27 23:35 PDT, JF Bastien
dbates: review-
dbates: commit-queue-
Details | Formatted Diff | Diff
patch (4.94 KB, patch)
2017-07-28 09:40 PDT, JF Bastien
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.


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?


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]

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]

(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]

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
Comment 8 Jonathan Bedard 2017-07-28 15:04:04 PDT
Committed r220017: <http://trac.webkit.org/changeset/220017>