Bug 124730 - check-webkit-style is wrong about expected format for std::function variables
Summary: check-webkit-style is wrong about expected format for std::function variables
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Lauro Moura
URL:
Keywords: InRadar
: 131202 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-21 11:38 PST by Brady Eidson
Modified: 2024-03-14 15:04 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2013-11-21 11:38:32 PST
check-webkit-style is wrong about expected format for std::function variables.

Seen in the patch(es) attached to https://bugs.webkit.org/show_bug.cgi?id=124698 -

Source/WebKit2/Shared/AsyncRequest.h:60:  Extra space before ( in function call  [whitespace/parens] [4]
Source/WebKit2/Shared/AsyncRequest.h:78:  Extra space before ( in function call  [whitespace/parens] [4]
Source/WebKit2/Shared/AsyncRequest.h:89:  Extra space before ( in function call  [whitespace/parens] [4]


The lines in question are:
    static PassRefPtr<AsyncRequest> create(std::function<void (Arguments...)> completionHandler)
    AsyncRequestImpl(std::function<void (Arguments...)> completionHandler)
    std::function<void (Arguments...)> m_completionHandler;

The style-checker needs to know that when "something that looks like a function decl/def" is inside std::function<> brackets, the space before the paren is expected.
Comment 1 László Langó 2014-04-04 00:03:54 PDT
*** Bug 131202 has been marked as a duplicate of this bug. ***
Comment 2 Lauro Moura 2024-03-06 20:58:08 PST
Pull request: https://github.com/WebKit/WebKit/pull/25567
Comment 3 EWS 2024-03-14 15:03:03 PDT
Committed 276122@main (b3871d2a862c): <https://commits.webkit.org/276122@main>

Reviewed commits have been landed. Closing PR #25567 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2024-03-14 15:04:18 PDT
<rdar://problem/124640815>